FIX: Lua - use lua_isnumber function

This commit is contained in:
Alexander Koblov 2024-01-14 18:20:53 +03:00
commit 6bbfb62293

View file

@ -305,7 +305,7 @@ begin
Result:= 1;
Search:= lua_tostring(L, 1);
Source:= lua_tostring(L, 2);
if lua_isinteger(L, 3) then begin
if lua_isnumber(L, 3) then begin
Offset:= lua_tointeger(L, 3)
end;
lua_pushinteger(L, UTF8Pos(Search, Source, Offset));