diff options
author | peter1138 <peter1138@openttd.org> | 2006-12-04 10:44:17 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2006-12-04 10:44:17 +0000 |
commit | a1f5d2078f47fcd19ca9b441a82d22ec7284c86a (patch) | |
tree | a678026a54eda98364cc431a87cb6fbb36104a5d | |
parent | 3b6d2ed064b790e9296f13656d742bbd67f3adf9 (diff) | |
download | openttd-a1f5d2078f47fcd19ca9b441a82d22ec7284c86a.tar.xz |
(svn r7349) -Fix (r7348): Stripping data path didn't work for absolute paths.
-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; |