summaryrefslogtreecommitdiff
path: root/src/goal_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/goal_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/goal_gui.cpp')
-rw-r--r--src/goal_gui.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/goal_gui.cpp b/src/goal_gui.cpp
index cb38d7f6e..f98189d18 100644
--- a/src/goal_gui.cpp
+++ b/src/goal_gui.cpp
@@ -23,6 +23,7 @@
#include "company_base.h"
#include "story_base.h"
#include "command_func.h"
+#include "string_func.h"
#include "widgets/goal_widget.h"
@@ -364,7 +365,7 @@ struct GoalQuestionWindow : public Window {
GoalQuestionWindow(WindowDesc *desc, WindowNumber window_number, byte type, uint32 button_mask, const char *question) : Window(desc), type(type)
{
assert(type < GOAL_QUESTION_TYPE_COUNT);
- this->question = strdup(question);
+ this->question = stredup(question);
/* Figure out which buttons we have to enable. */
uint bit;