[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] location: fix EOF check
From: |
Andreas Schwab |
Subject: |
[PATCH] location: fix EOF check |
Date: |
Sat, 28 Sep 2013 00:00:34 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
* location.c (location_caret): Use int, not char, for values from
getc.
---
src/location.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/location.c b/src/location.c
index 662b2a1..c873dcc 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. */
--
1.8.4
--
Andreas Schwab, address@hidden
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
- [PATCH] location: fix EOF check,
Andreas Schwab <=