mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
lex/parser.y fix Segmentation fault
Check the EOF first.
This commit is contained in:
parent
61e362add9
commit
503a62a822
1 changed files with 1 additions and 1 deletions
|
@ -620,7 +620,7 @@ yylex(void)
|
|||
if(debug)
|
||||
Bprint(&fout,"\n/*this comes from section three - debug */\n");
|
||||
# endif
|
||||
while(getl(buf) && !eof)
|
||||
while(!eof && getl(buf))
|
||||
Bprint(&fout,"%s\n",(char*)buf);
|
||||
return(freturn(0));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue