Merge pull request #2415 from polluks/patch-13
[grc65] Fixed segv of empty resource file
This commit is contained in:
@@ -231,9 +231,11 @@ static int findToken (const char * const *tokenTbl, const char *token)
|
|||||||
/* takes as input table of tokens and token, returns position in table or -1 if not found */
|
/* takes as input table of tokens and token, returns position in table or -1 if not found */
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; tokenTbl[i][0]; i++) {
|
if (token != NULL) {
|
||||||
if (strcmp (tokenTbl[i], token) == 0) {
|
for (i = 0; tokenTbl[i][0]; i++) {
|
||||||
return i;
|
if (strcmp (tokenTbl[i], token) == 0) {
|
||||||
|
return i;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user