cmd/yacc: correctly detect end of file in gettok

This prevents an infinite loop.

Change-Id: I7eda6b9d032ca0daeb24b555954330d07f35c78b
This commit is contained in:
Neven Sajko 2019-08-25 14:30:36 +00:00 committed by Russ Cox
parent eb4aea5072
commit bf59f0ed28

View file

@ -1805,6 +1805,8 @@ begin:
}
} else
return c;
if(c == Beof)
return ENDFILE;
Bungetrune(finput);
}
tokname[i] = 0;