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.67 2005/08/26 17:36:32 roberto Exp roberto $ | 2 | ** $Id: liolib.c,v 2.68 2005/10/14 16:24:11 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 | */ |
@@ -424,7 +424,7 @@ static int f_seek (lua_State *L) { | |||
424 | static const char *const modenames[] = {"set", "cur", "end", NULL}; | 424 | static const char *const modenames[] = {"set", "cur", "end", NULL}; |
425 | FILE *f = tofile(L); | 425 | FILE *f = tofile(L); |
426 | int op = luaL_checkoption(L, 2, "cur", modenames); | 426 | int op = luaL_checkoption(L, 2, "cur", modenames); |
427 | lua_Integer offset = luaL_optinteger(L, 3, 0); | 427 | long offset = luaL_optlong(L, 3, 0); |
428 | op = fseek(f, offset, mode[op]); | 428 | op = fseek(f, offset, mode[op]); |
429 | if (op) | 429 | if (op) |
430 | return pushresult(L, 0, NULL); /* error */ | 430 | return pushresult(L, 0, NULL); /* error */ |