mirror of
https://github.com/cc65/cc65.git
synced 2025-02-02 00:35:32 +00:00
Fixed segv
touch /tmp/xx grc65 /tmp/xx
This commit is contained in:
parent
4bde3afd80
commit
8d4946b3f4
@ -231,10 +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 */
|
||||
int i;
|
||||
|
||||
for (i = 0; tokenTbl[i][0]; i++) {
|
||||
if (strcmp (tokenTbl[i], token) == 0) {
|
||||
return i;
|
||||
}
|
||||
if (token != NULL) {
|
||||
for (i = 0; tokenTbl[i][0]; i++) {
|
||||
if (strcmp (tokenTbl[i], token) == 0) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user