aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1996-01-29 14:40:09 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1996-01-29 14:40:09 -0200
commit55a70c9719cce1b5b9ba78919a0ab54c8442af73 (patch)
tree8f51c3304958d6acd7c37b26077952fb9c271f1c
parent0d50b87aa47d3cb64730bf5c8646e5e6ff02c268 (diff)
downloadlua-55a70c9719cce1b5b9ba78919a0ab54c8442af73.tar.gz
lua-55a70c9719cce1b5b9ba78919a0ab54c8442af73.tar.bz2
lua-55a70c9719cce1b5b9ba78919a0ab54c8442af73.zip
"read('s')" was "eating" delimiter.
-rw-r--r--iolib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/iolib.c b/iolib.c
index 85fe1f1e..51ad432a 100644
--- a/iolib.c
+++ b/iolib.c
@@ -3,7 +3,7 @@
3** Input/output library to LUA 3** Input/output library to LUA
4*/ 4*/
5 5
6char *rcs_iolib="$Id: iolib.c,v 1.31 1996/01/22 17:38:57 roberto Exp roberto $"; 6char *rcs_iolib="$Id: iolib.c,v 1.31 1996/01/22 17:46:55 roberto Exp roberto $";
7 7
8#include <stdio.h> 8#include <stdio.h>
9#include <ctype.h> 9#include <ctype.h>
@@ -200,12 +200,12 @@ static int read_until_char (int del)
200 return c; 200 return c;
201} 201}
202 202
203static int read_until_blank (void) 203static void read_until_blank (void)
204{ 204{
205 int c; 205 int c;
206 while((c = fgetc(in)) != EOF && !isspace(c)) 206 while((c = fgetc(in)) != EOF && !isspace(c))
207 luaI_addchar(c); 207 luaI_addchar(c);
208 return c; 208 if (c != EOF) ungetc(c,in);
209} 209}
210 210
211static void read_m (int m) 211static void read_m (int m)