From 169870e37d0d979b2d161e59f50abc00f2ddc355 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 20 Nov 1996 11:47:59 -0200 Subject: BUG: ISO chars are negative, ISO ints are not. --- iolib.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/iolib.c b/iolib.c index 70a4074f..c2faf1c5 100644 --- a/iolib.c +++ b/iolib.c @@ -122,9 +122,10 @@ static void io_read (void) } else { char *ep = item_end(p); /* get what is next */ - int m; + int m; /* match result */ if (c == NEED_OTHER) c = getc(lua_infile); - if ((m = singlematch(c, p)) != 0) { + m = (c == EOF) ? 0 : singlematch((char)c, p); + if (m) { if (!inskip) luaI_addchar(c); c = NEED_OTHER; } -- cgit v1.2.3-55-g6feb