ScriptToNumber
function · ui · primitive
- Address
0x702e30· 270 bytes, up to0x702f3d- Signature
int __fastcall (lua_State *L)- Meaning
- Serves tonumber: converts argument 1 in base 10 or by strtoul in a base from 2 to 36
- Confidence
- verified, proof two
- Finding
- ui/luabase#tonumber
Finding: tonumber in ui: the Lua base library
tonumber(v [, base]) takes the base as __ftol of the optional number, default 10. Base 10 requires an argument and
answers its number value when lua_isnumber holds, else nil. Another base must be 2 to 36 (base out of range) and v
a string: strtoul (0x40dd0e, which calls _strtoxl 0x40db09 with the unsigned flag) parses it, and the answer is the unsigned value when nothing but white space follows the digits, else
nil. A string with no digits answers nil.
The derivation is in the doc.
Callers 0
None by a direct call or jump.
Callees 11
- __ftol crt
- _strtoul crt
- lua_isnumber lua
- lua_tonumber lua
- lua_pushnil lua
- lua_pushnumber lua
- luaL_argerror lua
- luaL_checkany lua
- luaL_checklstring lua
- luaL_optnumber lua
- _isspace crt
Calls and jumps by a bare address, from tables/calls.tsv.