summaryrefslogtreecommitdiff
path: root/src/osk_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/osk_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/osk_gui.cpp')
-rw-r--r--src/osk_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/osk_gui.cpp b/src/osk_gui.cpp
index 446f88db6..52ef5ebb9 100644
--- a/src/osk_gui.cpp
+++ b/src/osk_gui.cpp
@@ -59,7 +59,7 @@ struct OskWindow : public Window {
this->querystrings[WID_OSK_TEXT] = this->qs;
/* make a copy in case we need to reset later */
- this->orig_str_buf = strdup(this->qs->text.buf);
+ this->orig_str_buf = stredup(this->qs->text.buf);
this->InitNested(0);
this->SetFocusedWidget(WID_OSK_TEXT);
@@ -430,7 +430,7 @@ void UpdateOSKOriginalText(const Window *parent, int button)
if (osk == NULL || osk->parent != parent || osk->text_btn != button) return;
free(osk->orig_str_buf);
- osk->orig_str_buf = strdup(osk->qs->text.buf);
+ osk->orig_str_buf = stredup(osk->qs->text.buf);
osk->SetDirty();
}