aboutsummaryrefslogtreecommitdiff
path: root/liolib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-10-01 13:05:06 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-10-01 13:05:06 -0300
commit27f7bd2e8301213d1b84eecad5c3e5cee35b24eb (patch)
tree0d79644bae37f9766aa1bc3d6d0b5fd6a6882750 /liolib.c
parent798660c9cddef8a73f68058576e3d47eed2b1a27 (diff)
downloadlua-27f7bd2e8301213d1b84eecad5c3e5cee35b24eb.tar.gz
lua-27f7bd2e8301213d1b84eecad5c3e5cee35b24eb.tar.bz2
lua-27f7bd2e8301213d1b84eecad5c3e5cee35b24eb.zip
detail
Diffstat (limited to 'liolib.c')
-rw-r--r--liolib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/liolib.c b/liolib.c
index b5f7af7b..8a81dd57 100644
--- a/liolib.c
+++ b/liolib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: liolib.c,v 2.128 2014/07/29 16:01:00 roberto Exp roberto $ 2** $Id: liolib.c,v 2.129 2014/09/26 14:09:21 roberto Exp roberto $
3** Standard I/O (and system) library 3** Standard I/O (and system) library
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -581,7 +581,7 @@ static int io_readline (lua_State *L) {
581 lua_pushvalue(L, lua_upvalueindex(3 + i)); 581 lua_pushvalue(L, lua_upvalueindex(3 + i));
582 n = g_read(L, p->f, 2); /* 'n' is number of results */ 582 n = g_read(L, p->f, 2); /* 'n' is number of results */
583 lua_assert(n > 0); /* should return at least a nil */ 583 lua_assert(n > 0); /* should return at least a nil */
584 if (!lua_isnil(L, -n)) /* read at least one value? */ 584 if (lua_toboolean(L, -n)) /* read at least one value? */
585 return n; /* return them */ 585 return n; /* return them */
586 else { /* first result is nil: EOF or error */ 586 else { /* first result is nil: EOF or error */
587 if (n > 1) { /* is there error information? */ 587 if (n > 1) { /* is there error information? */