summaryrefslogtreecommitdiff
path: root/src/ini_load.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/ini_load.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/ini_load.cpp')
-rw-r--r--src/ini_load.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ini_load.cpp b/src/ini_load.cpp
index f90953a10..389dcab03 100644
--- a/src/ini_load.cpp
+++ b/src/ini_load.cpp
@@ -49,7 +49,7 @@ IniItem::~IniItem()
void IniItem::SetValue(const char *value)
{
free(this->value);
- this->value = strdup(value);
+ this->value = stredup(value);
}
/**
@@ -168,7 +168,7 @@ IniGroup *IniLoadFile::GetGroup(const char *name, size_t len, bool create_new)
/* otherwise make a new one */
IniGroup *group = new IniGroup(this, name, name + len - 1);
- group->comment = strdup("\n");
+ group->comment = stredup("\n");
return group;
}