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/subsidy.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/subsidy.cpp')
-rw-r--r-- | src/subsidy.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/subsidy.cpp b/src/subsidy.cpp index 974aa50a8..62b463ced 100644 --- a/src/subsidy.cpp +++ b/src/subsidy.cpp @@ -24,6 +24,7 @@ #include "core/random_func.hpp" #include "game/game.hpp" #include "command_func.h" +#include "string_func.h" #include "table/strings.h" @@ -47,7 +48,7 @@ void Subsidy::AwardTo(CompanyID company) SetDParam(0, company); GetString(company_name, STR_COMPANY_NAME, lastof(company_name)); - char *cn = strdup(company_name); + char *cn = stredup(company_name); /* Add a news item */ Pair reftype = SetupSubsidyDecodeParam(this, false); |