mirror of
https://github.com/nodemcu/nodemcu-firmware.git
synced 2025-01-16 20:52:57 +08:00
Merge pull request #247 from Ezekiel-DA/dev
Fix file.seek() return value (@Ezekiel-DA)
This commit is contained in:
commit
c374b7df44
@ -111,7 +111,7 @@ static int file_seek (lua_State *L)
|
|||||||
long offset = luaL_optlong(L, 2, 0);
|
long offset = luaL_optlong(L, 2, 0);
|
||||||
op = fs_seek(file_fd, offset, mode[op]);
|
op = fs_seek(file_fd, offset, mode[op]);
|
||||||
if (op)
|
if (op)
|
||||||
lua_pushboolean(L, 1); /* error */
|
lua_pushnil(L); /* error */
|
||||||
else
|
else
|
||||||
lua_pushinteger(L, fs_tell(file_fd));
|
lua_pushinteger(L, fs_tell(file_fd));
|
||||||
return 1;
|
return 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user