mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-24 11:41:58 +00:00
cmd/yacc: correctly detect end of file in gettok
This prevents an infinite loop. Change-Id: I7eda6b9d032ca0daeb24b555954330d07f35c78b
This commit is contained in:
parent
eb4aea5072
commit
bf59f0ed28
1 changed files with 2 additions and 0 deletions
|
@ -1805,6 +1805,8 @@ begin:
|
|||
}
|
||||
} else
|
||||
return c;
|
||||
if(c == Beof)
|
||||
return ENDFILE;
|
||||
Bungetrune(finput);
|
||||
}
|
||||
tokname[i] = 0;
|
||||
|
|
Loading…
Reference in a new issue