diff options
author | rubidium <rubidium@openttd.org> | 2014-04-25 15:40:32 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2014-04-25 15:40:32 +0000 |
commit | 9ed12b0f07edb342aaff21c130d325fd158a9d5b (patch) | |
tree | f42aa775396b4ebda4d119f76e80a77c180936c7 /src/newgrf_gui.cpp | |
parent | 4227f495c51ea909707505ec2ef1c730a382965d (diff) | |
download | openttd-9ed12b0f07edb342aaff21c130d325fd158a9d5b.tar.xz |
(svn r26509) -Codechange: replace strdup with stredup (the latter ensures the return is not NULL)
Diffstat (limited to 'src/newgrf_gui.cpp')
-rw-r--r-- | src/newgrf_gui.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp index 9cbbded69..462360d59 100644 --- a/src/newgrf_gui.cpp +++ b/src/newgrf_gui.cpp @@ -2036,9 +2036,9 @@ struct ScanProgressWindow : public Window { if (name == NULL) { char buf[256]; GetString(buf, STR_NEWGRF_SCAN_ARCHIVES, lastof(buf)); - this->last_name = strdup(buf); + this->last_name = stredup(buf); } else { - this->last_name = strdup(name); + this->last_name = stredup(name); } this->scanned = num; if (num > _settings_client.gui.last_newgrf_count) _settings_client.gui.last_newgrf_count = num; |