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.90 2010/07/25 15:18:19 roberto Exp roberto $ | 2 | ** $Id: liolib.c,v 2.91 2010/07/28 15:51:59 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 | */ |
@@ -453,7 +453,7 @@ static int f_read (lua_State *L) { | |||
453 | static int io_readline (lua_State *L) { | 453 | static int io_readline (lua_State *L) { |
454 | FILE *f = *(FILE **)lua_touserdata(L, lua_upvalueindex(1)); | 454 | FILE *f = *(FILE **)lua_touserdata(L, lua_upvalueindex(1)); |
455 | int i; | 455 | int i; |
456 | int n = lua_tointeger(L, lua_upvalueindex(2)); | 456 | int n = (int)lua_tointeger(L, lua_upvalueindex(2)); |
457 | if (f == NULL) /* file is already closed? */ | 457 | if (f == NULL) /* file is already closed? */ |
458 | luaL_error(L, "file is already closed"); | 458 | luaL_error(L, "file is already closed"); |
459 | lua_settop(L , 1); | 459 | lua_settop(L , 1); |