mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-22 20:21:06 +00:00
A filename without an extension can be passed to generateSubstResFileName() ; changed assert() condition accordingly.
svn-id: r20251
This commit is contained in:
parent
9fee68f3b0
commit
446689e595
@ -3184,7 +3184,7 @@ static int generateSubstResFileName_(const char *filename, char *buf, int bufsiz
|
||||
return -1;
|
||||
|
||||
size_t len = strlen(filename);
|
||||
assert(len >= 5);
|
||||
assert(len > 0);
|
||||
|
||||
char num = filename[len - 1];
|
||||
|
||||
@ -3192,9 +3192,7 @@ static int generateSubstResFileName_(const char *filename, char *buf, int bufsiz
|
||||
if (num == ')')
|
||||
num = filename[len - 2];
|
||||
|
||||
const char *ext = NULL;
|
||||
|
||||
ext = strrchr(filename, '.');
|
||||
const char *ext = strrchr(filename, '.');
|
||||
if (ext)
|
||||
len = ext - filename;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user