Add dummy entry at end of substResFileNameTable[] and use that like in other
tables. Fixes crash on PSP svn-id: r19343
This commit is contained in:
parent
f1ac01cdcb
commit
eda2b6f337
1 changed files with 2 additions and 1 deletions
|
@ -847,6 +847,7 @@ static SubstResFileNames substResFileNameTable[] = {
|
|||
{ "thinkerk", "ThinkerK", kGenMac },
|
||||
{ "water", "Water Worries", kGenMac },
|
||||
#endif
|
||||
{ NULL, NULL, 0 }
|
||||
};
|
||||
|
||||
static int compareMD5Table(const void *a, const void *b) {
|
||||
|
@ -3023,7 +3024,7 @@ static int generateSubstResFileName_(const char *filename, char *buf, int bufsiz
|
|||
ext = strrchr(filename, '.');
|
||||
size_t len = (ext != NULL) ? ext - filename : strlen(filename);
|
||||
|
||||
for (int i = index; i < ARRAYSIZE(substResFileNameTable); i++) {
|
||||
for (int i = index; substResFileNameTable[i].winName; i++) {
|
||||
if (!scumm_strnicmp(filename, substResFileNameTable[i].winName, len)) {
|
||||
switch (substResFileNameTable[i].genMethod) {
|
||||
case kGenMac:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue