benilla-re systems structs docs

LoadString

function · lua · boundary

Address
0x6fee40 · 57 bytes, up to 0x6fee78
Meaning
Reads a string of a precompiled chunk, null when its size is 0
Confidence
verified, proof one
Finding
lua/chunks#reading-the-stream

Finding: Reading the stream in lua: precompiled chunks

The reader takes bytes through the stream of the input module (runtime, Input streams) and raises unexpected end of file in %s when it ends. A block is read as it is, or byte by byte from its last byte when the swap flag is set; a vector swaps each element. An integer must not be negative (bad integer in %s). A string is a size, 0 for none, then that many bytes ending in a zero, which the string drops.

functionnamedecided by
0x6fed20ezgetcnext byte or luaZ_fill (0x6fed26..0x6fed44), end gives unexpectedEOZ (0x6fed4b..0x6fed52)
0x6fed60unexpectedEOZthe message (0x6fed66), luaG_runerror (0x6fed6c)
0x6fee10ezreadluaZ_read (0x6fee1d), bytes left give unexpectedEOZ (0x6fee24, 0x6fee28)
0x6fedc0LoadBlockswap flag (0x6fedc7), bytes stored from the last (0x6fede0..0x6fedeb), else ezread (0x6fedf7)
0x6feee0LoadVectorswap flag (0x6feee4), each element reversed (0x6fef10..0x6fef33), else ezread of the product (0x6fef3e..0x6fef46)
0x6fed80LoadIntLoadBlock 4 (0x6fed8c), negative (0x6fed94), bad integer in %s (0x6fed9e)
0x6fee80LoadSizeLoadBlock 4 (0x6fee89)
0x6ff1f0LoadNumberLoadBlock 8 (0x6ff1fb), fld (0x6ff200)
0x6fee40LoadStringLoadSize (0x6fee44), 0 gives null (0x6fee4b), luaZ_openspace (0x6fee59), ezread (0x6fee65), luaS_newlstr of size less 1 (0x6fee6c, 0x6fee70)

The derivation is in the doc.

Callers 4

Callees 4

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