Corrected filename (used in demo apps) when compiled with MinGW.

This commit is contained in:
skarg
2010-04-23 18:08:56 +00:00
parent 202bc06768
commit 9c667949cc
+7 -2
View File
@@ -44,11 +44,16 @@ char *filename_remove_path(
/* allow the device ID to be set */
if (filename_in) {
filename_out = strrchr(filename_in, '\\');
if (!filename_out)
if (!filename_out) {
filename_out = strrchr(filename_in, '/');
}
/* go beyond the slash */
if (filename_out)
if (filename_out) {
filename_out++;
} else {
/* no slash in filename */
filename_out = (char *) filename_in;
}
}
return filename_out;