summaryrefslogtreecommitdiff
path: root/src/gfxinit.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-05-24 20:29:04 +0000
committerrubidium <rubidium@openttd.org>2009-05-24 20:29:04 +0000
commit0d99b6c71cd096599b4805d230483f3e4e958af1 (patch)
tree463b69c3b2ea6f697506be055622229767dfebc4 /src/gfxinit.cpp
parent36e71c8df6fe1f4c303d98b609bb9cdd0c4b7e75 (diff)
downloadopenttd-0d99b6c71cd096599b4805d230483f3e4e958af1.tar.xz
(svn r16421) -Codechange: do not unnecessarily remove constness or unnecessarily add it.
Diffstat (limited to 'src/gfxinit.cpp')
-rw-r--r--src/gfxinit.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gfxinit.cpp b/src/gfxinit.cpp
index 9619b4e87..0554eee9b 100644
--- a/src/gfxinit.cpp
+++ b/src/gfxinit.cpp
@@ -378,8 +378,7 @@ static bool FillGraphicsSetDetails(GraphicsSet *graphics, IniFile *ini, const ch
}
const char *filename = item->value;
- file->filename = MallocT<char>(strlen(filename) + strlen(path) + 1);
- sprintf((char*)file->filename, "%s%s", path, filename);
+ file->filename = str_fmt("%s%s", path, filename);
/* Then find the MD5 checksum */
item = md5s->GetItem(filename, false);