summaryrefslogtreecommitdiff
path: root/src/news_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2014-04-25 15:40:32 +0000
committerrubidium <rubidium@openttd.org>2014-04-25 15:40:32 +0000
commit9ed12b0f07edb342aaff21c130d325fd158a9d5b (patch)
treef42aa775396b4ebda4d119f76e80a77c180936c7 /src/news_gui.cpp
parent4227f495c51ea909707505ec2ef1c730a382965d (diff)
downloadopenttd-9ed12b0f07edb342aaff21c130d325fd158a9d5b.tar.xz
(svn r26509) -Codechange: replace strdup with stredup (the latter ensures the return is not NULL)
Diffstat (limited to 'src/news_gui.cpp')
-rw-r--r--src/news_gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/news_gui.cpp b/src/news_gui.cpp
index 77fc5828d..7098b315b 100644
--- a/src/news_gui.cpp
+++ b/src/news_gui.cpp
@@ -726,7 +726,7 @@ CommandCost CmdCustomNewsItem(TileIndex tile, DoCommandFlag flags, uint32 p1, ui
if (company != INVALID_OWNER && company != _local_company) return CommandCost();
if (flags & DC_EXEC) {
- char *news = strdup(text);
+ char *news = stredup(text);
SetDParamStr(0, news);
AddNewsItem(STR_NEWS_CUSTOM_ITEM, type, NF_NORMAL, reftype1, p2, NR_NONE, UINT32_MAX, news);
}