diff options
author | Gregory Montoir | 2006-01-27 23:10:24 +0000 |
---|---|---|
committer | Gregory Montoir | 2006-01-27 23:10:24 +0000 |
commit | 446689e595ac7d0da7b33330734465b1b22551c4 (patch) | |
tree | de777bf25b22e453c215a3312daca6390fd5665a | |
parent | 9fee68f3b0f9b2af4a7e7befbe1d3b3f137f27ad (diff) | |
download | scummvm-rg350-446689e595ac7d0da7b33330734465b1b22551c4.tar.gz scummvm-rg350-446689e595ac7d0da7b33330734465b1b22551c4.tar.bz2 scummvm-rg350-446689e595ac7d0da7b33330734465b1b22551c4.zip |
A filename without an extension can be passed to generateSubstResFileName() ; changed assert() condition accordingly.
svn-id: r20251
-rw-r--r-- | scumm/scumm.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp index fe0de5a8da..943c7f8d5f 100644 --- a/scumm/scumm.cpp +++ b/scumm/scumm.cpp @@ -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; |