diff options
author | Andreas Schwab <schwab@linux-m68k.org> | 2013-09-28 00:00:34 +0200 |
---|---|---|
committer | Akim Demaille <akim@lrde.epita.fr> | 2013-10-04 14:00:52 +0200 |
commit | 4c4191cec2b30632a31993a6e46fb241ab9c3434 (patch) | |
tree | 68b3045b137fa881e3d8bd292eb296a560f19766 | |
parent | ae7cd18c98d9bad7e95d4f4070d2d09e8db675f8 (diff) | |
download | bison-4c4191cec2b30632a31993a6e46fb241ab9c3434.tar.gz |
location: fix EOF check
* location.c (location_caret): Use int, not char, for values from
getc.
-rw-r--r-- | src/location.c | 2 |
1 files changed, 1 insertions, 1 deletions
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. */ |