(svn r7349) -Fix (r7348): Stripping data path didn't work for absolute paths.
authorpeter1138
Mon, 04 Dec 2006 10:44:17 +0000
changeset 5229 95fb62dc55d7
parent 5228 c4a780348f66
child 5230 660ae3a1ec4c
(svn r7349) -Fix (r7348): Stripping data path didn't work for absolute paths.
newgrf_config.c
--- a/newgrf_config.c	Mon Dec 04 08:30:04 2006 +0000
+++ b/newgrf_config.c	Mon Dec 04 10:44:17 2006 +0000
@@ -176,7 +176,7 @@
 		} 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;