mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-24 11:41:58 +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)
|
if(debug)
|
||||||
Bprint(&fout,"\n/*this comes from section three - debug */\n");
|
Bprint(&fout,"\n/*this comes from section three - debug */\n");
|
||||||
# endif
|
# endif
|
||||||
while(getl(buf) && !eof)
|
while(!eof && getl(buf))
|
||||||
Bprint(&fout,"%s\n",(char*)buf);
|
Bprint(&fout,"%s\n",(char*)buf);
|
||||||
return(freturn(0));
|
return(freturn(0));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue