summaryrefslogtreecommitdiff
path: root/gfxinit.c
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2006-07-31 22:11:34 +0000
committerDarkvater <darkvater@openttd.org>2006-07-31 22:11:34 +0000
commitcef563141a3f1bfe8d8f2bf5211598df57e4ec0f (patch)
tree324b4fc0d30866882b6415c8accf29bf57ca9be6 /gfxinit.c
parent17dc89880501bcd0fc341db033596cfd066d4eaf (diff)
downloadopenttd-cef563141a3f1bfe8d8f2bf5211598df57e4ec0f.tar.xz
(svn r5684) - Codechange: create an strtolower() function that uses tolower() on a whole string and apply it in the places this was used.
Diffstat (limited to 'gfxinit.c')
-rw-r--r--gfxinit.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gfxinit.c b/gfxinit.c
index 522687627..fbc0e1e9c 100644
--- a/gfxinit.c
+++ b/gfxinit.c
@@ -9,6 +9,7 @@
#include "spritecache.h"
#include "table/sprites.h"
#include "fileio.h"
+#include "string.h"
#include "newgrf.h"
#include "md5.h"
#include "variables.h"
@@ -123,10 +124,7 @@ static bool FileMD5(const MD5File file, bool warn)
#if !defined(WIN32)
if (f == NULL) {
- char *s;
- // make lower case and check again
- for (s = buf + strlen(_path.data_dir) - 1; *s != '\0'; s++)
- *s = tolower(*s);
+ strtolower(buf + strlen(_path.data_dir) - 1);
f = fopen(buf, "rb");
}
#endif