Fix filling in demo name on Windows. The last directory delimiter will always
authorparasti <parasti@78b8d119-cf0a-0410-b17c-f493084dd1d7>
Mon, 5 Jun 2006 14:59:46 +0000 (14:59 +0000)
committerparasti <parasti@78b8d119-cf0a-0410-b17c-f493084dd1d7>
Mon, 5 Jun 2006 14:59:46 +0000 (14:59 +0000)
be a "/", cause that's what config_file() puts there.

git-svn-id: https://s.snth.net/svn/neverball/trunk@430 78b8d119-cf0a-0410-b17c-f493084dd1d7

ball/demo.c

index d906a23..519fe69 100644 (file)
@@ -103,11 +103,7 @@ FILE *demo_header_read(const char *filename, struct demo *d)
             strncpy(d->filename, filename, PATHMAX);
             
             /* Remove the directory delimiter */
-#ifdef _WIN32
-            basename = strrchr(filename, '\\');
-#else
             basename = strrchr(filename, '/');
-#endif
             
             if (basename != NULL)
                 strncpy(buf, basename + 1, MAXSTR);