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
@ -1805,6 +1805,8 @@ begin:
|
|||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
return c;
|
return c;
|
||||||
|
if(c == Beof)
|
||||||
|
return ENDFILE;
|
||||||
Bungetrune(finput);
|
Bungetrune(finput);
|
||||||
}
|
}
|
||||||
tokname[i] = 0;
|
tokname[i] = 0;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user