Skip to content

Commit

Permalink
File:seek returns success;
Browse files Browse the repository at this point in the history
  • Loading branch information
bjornbytes committed Nov 23, 2023
1 parent 1ef562d commit c0c62e1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/api/l_filesystem_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,9 @@ static int l_lovrFileSeek(lua_State* L) {
File* file = luax_checktype(L, 1, File);
lua_Number offset = luaL_checknumber(L, 2);
lovrCheck(offset >= 0 && offset < 9007199254740992.0, "Invalid seek position");
lovrFileSeek(file, offset);
return 0;
bool success = lovrFileSeek(file, offset);
lua_pushboolean(L, success);
return 1;
}

static int l_lovrFileTell(lua_State* L) {
Expand Down

0 comments on commit c0c62e1

Please sign in to comment.