From 97876d66909605ab97656b0248889e49d9d363e3 Mon Sep 17 00:00:00 2001 From: Richard Earnshaw Date: Thu, 25 Jan 2001 10:35:09 +0000 Subject: [PATCH] * lex.c (java_read_char): Check for EOF from getc first. From-SVN: r39261 --- gcc/java/ChangeLog | 4 ++++ gcc/java/lex.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index c610918465c..cbe63223b35 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,7 @@ +2001-01-25 Richard Earnshaw + + * lex.c (java_read_char): Check for EOF from getc first. + 2001-01-23 Alexandre Petit-Bianco * class.c (layout_class): Don't lay the superclass out if it's diff --git a/gcc/java/lex.c b/gcc/java/lex.c index 32c104e770c..fdfb0a7705d 100644 --- a/gcc/java/lex.c +++ b/gcc/java/lex.c @@ -447,10 +447,10 @@ java_read_char (lex) int c, c1, c2; c = getc (lex->finput); - if (c < 128) - return (unicode_t)c; if (c == EOF) return UEOF; + if (c < 128) + return (unicode_t)c; else { if ((c & 0xe0) == 0xc0) -- 2.30.2