diff options
Diffstat (limited to 'src/tool/mapcache.c')
-rw-r--r-- | src/tool/mapcache.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/tool/mapcache.c b/src/tool/mapcache.c index 356cdd352..72457b73a 100644 --- a/src/tool/mapcache.c +++ b/src/tool/mapcache.c @@ -188,7 +188,7 @@ char *remove_extension(char *mapname) char *ptr, *ptr2; ptr = strchr(mapname, '.'); if (ptr) { //Check and remove extension. - while (ptr[1] && (ptr2 = strchr(ptr+1, '.'))) + while (ptr[1] && (ptr2 = strchr(ptr+1, '.')) != NULL) ptr = ptr2; //Skip to the last dot. if (strcmp(ptr,".gat") == 0) *ptr = '\0'; //Remove extension. @@ -256,7 +256,6 @@ void cmdline_args_init_local(void) CMDLINEARG_DEF2(map-list, maplist, "Alternative map list file", CMDLINE_OPT_NORMAL|CMDLINE_OPT_PARAM); CMDLINEARG_DEF2(map-cache, mapcache, "Alternative map cache file", CMDLINE_OPT_NORMAL|CMDLINE_OPT_PARAM); CMDLINEARG_DEF2(rebuild, rebuild, "Forces a rebuild of the map cache, rather than only adding missing maps", CMDLINE_OPT_NORMAL); - } int do_init(int argc, char** argv) |