aboutsummaryrefslogtreecommitdiff
path: root/liolib.c
diff options
context:
space:
mode:
Diffstat (limited to 'liolib.c')
-rw-r--r--liolib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/liolib.c b/liolib.c
index 83fbb172..56507d5e 100644
--- a/liolib.c
+++ b/liolib.c
@@ -624,7 +624,7 @@ static int io_readline (lua_State *L) {
624 lua_pushvalue(L, lua_upvalueindex(3 + i)); 624 lua_pushvalue(L, lua_upvalueindex(3 + i));
625 n = g_read(L, p->f, 2); /* 'n' is number of results */ 625 n = g_read(L, p->f, 2); /* 'n' is number of results */
626 lua_assert(n > 0); /* should return at least a nil */ 626 lua_assert(n > 0); /* should return at least a nil */
627 if (lua_toboolean(L, -n)) /* read at least one value? */ 627 if (!lua_isnil(L, -n)) /* read at least one value? */
628 return n; /* return them */ 628 return n; /* return them */
629 else { /* first result is nil: EOF or error */ 629 else { /* first result is nil: EOF or error */
630 if (n > 1) { /* is there error information? */ 630 if (n > 1) { /* is there error information? */