diff options
-rw-r--r-- | newgrf_config.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/newgrf_config.c b/newgrf_config.c index 8c07c8af6..8beb9945a 100644 --- a/newgrf_config.c +++ b/newgrf_config.c @@ -176,7 +176,7 @@ static uint ScanPath(const char *path) } else if (sb.st_mode & S_IFREG) { /* File */ char *ext = strrchr(filename, '.'); - char *file = strchr(filename, PATHSEPCHAR) + 1; // Crop base path + char *file = filename + strlen(_path.data_dir) + 1; // Crop base path /* If no extension or extension isn't .grf, skip the file */ if (ext == NULL) continue; |