From: Andreas Schwab Date: Fri, 27 Sep 2013 22:00:34 +0000 (+0200) Subject: location: fix EOF check X-Git-Tag: v3.0.1~23 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/4c4191cec2b30632a31993a6e46fb241ab9c3434 location: fix EOF check * location.c (location_caret): Use int, not char, for values from getc. --- diff --git a/src/location.c b/src/location.c index 662b2a12..c873dccd 100644 --- a/src/location.c +++ b/src/location.c @@ -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. */