Using platform_get_path_separator for getting the filename now

This commit is contained in:
Hielke Morsink 2015-11-29 17:01:41 +01:00
parent 415f55d38d
commit 02349d2463
1 changed files with 1 additions and 3 deletions

View File

@ -56,9 +56,7 @@ bool filename_valid_characters(const utf8 *filename)
const char *path_get_filename(const utf8 *path)
{
// Find last slash or backslash in the path
char *filename = strrchr(path, '/');
if (filename == NULL)
filename = strrchr(path, '\\');
char *filename = strrchr(path, platform_get_path_separator());
assert(filename != NULL);