diff options
Diffstat (limited to 'liolib.c')
-rw-r--r-- | liolib.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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? */ |