commit 169870e37d0d979b2d161e59f50abc00f2ddc355
parent 78e454d864a83b1f4c99b7deb3c1c10d6e91fdc6
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Wed, 20 Nov 1996 11:47:39 -0200
BUG: ISO chars are negative, ISO ints are not.
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git 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;
}