From 9ed12b0f07edb342aaff21c130d325fd158a9d5b Mon Sep 17 00:00:00 2001 From: rubidium Date: Fri, 25 Apr 2014 15:40:32 +0000 Subject: (svn r26509) -Codechange: replace strdup with stredup (the latter ensures the return is not NULL) --- src/goal_gui.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/goal_gui.cpp') 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; -- cgit v1.2.3-54-g00ecf