summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-08-09 19:06:05 +0000
committerrubidium <rubidium@openttd.org>2009-08-09 19:06:05 +0000
commited9c01e8b04305dc62f7173649f44bd27ac4b623 (patch)
tree771f0d41851f4115e5ece1d17e33bfe3fb0ad960
parent49c3d453be597ec82182d2f4a7fb4160080c3d60 (diff)
downloadopenttd-ed9c01e8b04305dc62f7173649f44bd27ac4b623.tar.xz
(svn r17137) -Fix (r17129): strgen complained a lot about english.txt compiled with MSVC.
-rw-r--r--src/strgen/strgen.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/strgen/strgen.cpp b/src/strgen/strgen.cpp
index 032905066..e8f8de50b 100644
--- a/src/strgen/strgen.cpp
+++ b/src/strgen/strgen.cpp
@@ -806,7 +806,10 @@ static void ParseFile(const char *file, bool english)
FILE *in;
char buf[2048];
- _translation = strcmp(file, _file) != 0;
+ /* Only look at the final filename to determine whether it's be base language or not */
+ const char *cur_file = strrchr(_file, PATHSEPCHAR);
+ const char *next_file = strrchr(file, PATHSEPCHAR);
+ _translation = next_file != NULL && cur_file != NULL && strcmp(cur_file, next_file) != 0;
_file = file;
/* For each new file we parse, reset the genders, and language codes */