mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-04-19 21:43:27 +00:00
parent
a4f56a459a
commit
a582f1a262
10
src/lib_io.c
10
src/lib_io.c
@ -329,14 +329,8 @@ LJLIB_CF(io_method_seek)
|
|||||||
else if (opt == 1) opt = SEEK_CUR;
|
else if (opt == 1) opt = SEEK_CUR;
|
||||||
else if (opt == 2) opt = SEEK_END;
|
else if (opt == 2) opt = SEEK_END;
|
||||||
o = L->base+2;
|
o = L->base+2;
|
||||||
if (o < L->top) {
|
if (o < L->top && !tvisnil(o))
|
||||||
if (tvisint(o))
|
ofs = (int64_t)lj_lib_checknum(L, 3);
|
||||||
ofs = (int64_t)intV(o);
|
|
||||||
else if (tvisnum(o))
|
|
||||||
ofs = (int64_t)numV(o);
|
|
||||||
else if (!tvisnil(o))
|
|
||||||
lj_err_argt(L, 3, LUA_TNUMBER);
|
|
||||||
}
|
|
||||||
#if LJ_TARGET_POSIX
|
#if LJ_TARGET_POSIX
|
||||||
res = fseeko(fp, ofs, opt);
|
res = fseeko(fp, ofs, opt);
|
||||||
#elif _MSC_VER >= 1400
|
#elif _MSC_VER >= 1400
|
||||||
|
Loading…
Reference in New Issue
Block a user