From 39e52ca845e88cdb128d3f8b6b0d1c8dd88bfa10 Mon Sep 17 00:00:00 2001 From: peter1138 Date: Mon, 4 Dec 2006 10:44:17 +0000 Subject: [PATCH] (svn r7349) -Fix (r7348): Stripping data path didn't work for absolute paths. --- newgrf_config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/newgrf_config.c b/newgrf_config.c index 8c07c8af68..8beb9945a2 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;