mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
location: fix EOF check
* location.c (location_caret): Use int, not char, for values from getc.
This commit is contained in:
committed by
Akim Demaille
parent
ae7cd18c98
commit
4c4191cec2
@@ -188,7 +188,7 @@ location_caret (location loc, FILE *out)
|
||||
/* Read the actual line. Don't update the offset, so that we keep a pointer
|
||||
to the start of the line. */
|
||||
{
|
||||
char c = getc (caret_info.source);
|
||||
int c = getc (caret_info.source);
|
||||
if (c != EOF)
|
||||
{
|
||||
/* Quote the file, indent by a single column. */
|
||||
|
||||
Reference in New Issue
Block a user