aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1996-11-20 11:47:59 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1996-11-20 11:47:59 -0200
commit169870e37d0d979b2d161e59f50abc00f2ddc355 (patch)
tree9be6cf9edc396dd58aac9cc93181da1a0193bb47
parent78e454d864a83b1f4c99b7deb3c1c10d6e91fdc6 (diff)
downloadlua-169870e37d0d979b2d161e59f50abc00f2ddc355.tar.gz
lua-169870e37d0d979b2d161e59f50abc00f2ddc355.tar.bz2
lua-169870e37d0d979b2d161e59f50abc00f2ddc355.zip
BUG: ISO chars are negative, ISO ints are not.
-rw-r--r--iolib.c5
1 files 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)
122 } 122 }
123 else { 123 else {
124 char *ep = item_end(p); /* get what is next */ 124 char *ep = item_end(p); /* get what is next */
125 int m; 125 int m; /* match result */
126 if (c == NEED_OTHER) c = getc(lua_infile); 126 if (c == NEED_OTHER) c = getc(lua_infile);
127 if ((m = singlematch(c, p)) != 0) { 127 m = (c == EOF) ? 0 : singlematch((char)c, p);
128 if (m) {
128 if (!inskip) luaI_addchar(c); 129 if (!inskip) luaI_addchar(c);
129 c = NEED_OTHER; 130 c = NEED_OTHER;
130 } 131 }