benilla-re systems structs docs

str_byte

function · lua · boundary

Address
0x7fc210 · 111 bytes, up to 0x7fc27e
Signature
int __fastcall (lua_State *L)
Meaning
Pushes the code of the byte at a position, nothing outside the string
Confidence
verified, proof one
Finding
lua/libs#string-basics

Finding: String basics in lua: the libraries

Six string functions are plain: len, sub (indices from either end through posrelat, the last index defaulting to -1), rep (a count of copies), byte (the code at one position, default 1, one result), char (a string from codes, invalid value above 255) and dump (a Lua function with no upvalues as a string through lua_dump). posrelat turns a negative position into one counted from the end, and writer is the callback lua_dump calls.

functionnamedecided by
0x7fbcf0str_lenluaL_checklstring (0x7fbd02), the length pushed (0x7fbd1f)
0x7fbd30str_subposrelat twice (0x7fbd5f, 0x7fbd83), default -1 for the end, lua_pushlstring (0x7fbda9)
0x7fbde0posrelata negative position gets len + 1 added; the body is 11 bytes (0x7fbde0)
0x7fc1a0str_repluaL_buffinit (0x7fc1d9), luaL_addlstring per copy (0x7fc1ee), luaL_pushresult (0x7fc1fc)
0x7fc210str_byteluaL_optnumber (0x7fc238), posrelat (0x7fc247), one lua_pushnumber (0x7fc267)
0x7fc280str_charlua_gettop loop, value tested against 255, invalid value (0x7fc2c8), luaL_argerror (0x7fc2d1)
0x7fc330str_dumpluaL_checktype 6 (0x7fc343), lua_dump (0x7fc363), unable to dump given function (0x7fc36c)
0x7fc390writerluaL_addlstring (0x7fc39a)

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 5

Calls and jumps by a bare address, from tables/calls.tsv.