From c869eddb8a79945a05aebee641814ee93d9ad343 Mon Sep 17 00:00:00 2001 From: Ezekiel-DA Date: Wed, 25 Feb 2015 14:34:07 -0500 Subject: [PATCH] Update file.c Made file.seek() return nil on error / EOF, as specified in documentation, instead of returning true. --- app/modules/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/modules/file.c b/app/modules/file.c index c402bbf2..cf10a3a7 100644 --- a/app/modules/file.c +++ b/app/modules/file.c @@ -111,7 +111,7 @@ static int file_seek (lua_State *L) long offset = luaL_optlong(L, 2, 0); op = fs_seek(file_fd, offset, mode[op]); if (op) - lua_pushboolean(L, 1); /* error */ + lua_pushnil(L); /* error */ else lua_pushinteger(L, fs_tell(file_fd)); return 1;