lua

A copy of the Lua development repository
Log | Files | Refs | README

commit 55a70c9719cce1b5b9ba78919a0ab54c8442af73
parent 0d50b87aa47d3cb64730bf5c8646e5e6ff02c268
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Mon, 29 Jan 1996 14:39:49 -0200

"read('s')" was "eating" delimiter.

Diffstat:
Miolib.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/iolib.c b/iolib.c @@ -3,7 +3,7 @@ ** Input/output library to LUA */ -char *rcs_iolib="$Id: iolib.c,v 1.31 1996/01/22 17:38:57 roberto Exp roberto $"; +char *rcs_iolib="$Id: iolib.c,v 1.31 1996/01/22 17:46:55 roberto Exp roberto $"; #include <stdio.h> #include <ctype.h> @@ -200,12 +200,12 @@ static int read_until_char (int del) return c; } -static int read_until_blank (void) +static void read_until_blank (void) { int c; while((c = fgetc(in)) != EOF && !isspace(c)) luaI_addchar(c); - return c; + if (c != EOF) ungetc(c,in); } static void read_m (int m)