From f9dd50cefc6c1c2c57f24d9985c1cc073d9d7300 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 22 Sep 2000 15:14:06 -0300 Subject: `read("*w")' should return nil at EOF --- liolib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'liolib.c') diff --git a/liolib.c b/liolib.c index 6ba4f527..2b4e2f0e 100644 --- a/liolib.c +++ b/liolib.c @@ -1,5 +1,5 @@ /* -** $Id: liolib.c,v 1.83 2000/09/13 20:12:14 roberto Exp roberto $ +** $Id: liolib.c,v 1.84 2000/09/14 14:09:31 roberto Exp roberto $ ** Standard I/O (and system) library ** See Copyright Notice in lua.h */ @@ -324,7 +324,7 @@ static int read_word (lua_State *L, FILE *f) { } ungetc(c, f); luaL_pushresult(&b); /* close buffer */ - return (lua_strlen(L, 1) > 0); + return (lua_strlen(L, -1) > 0); } -- cgit v1.2.3-55-g6feb