summaryrefslogtreecommitdiff
path: root/src/fontdetection.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/fontdetection.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/fontdetection.cpp')
-rw-r--r--src/fontdetection.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fontdetection.cpp b/src/fontdetection.cpp
index bf97daabf..0033cdfa7 100644
--- a/src/fontdetection.cpp
+++ b/src/fontdetection.cpp
@@ -566,7 +566,7 @@ FT_Error GetFontByFaceName(const char *font_name, FT_Face *face)
char *font_family;
/* Split & strip the font's style */
- font_family = strdup(font_name);
+ font_family = stredup(font_name);
font_style = strchr(font_family, ',');
if (font_style != NULL) {
font_style[0] = '\0';