benilla-re systems structs docs

SCmdGetString

function · storm · boundary

Address
0x64f270 · 138 bytes, up to 0x64f2f9
Signature
uint32_t __stdcall (uint32_t id, char *buffer, uint32_t size)
Meaning
Copies the string of the switch with an id into a buffer and returns 1, or returns 0 when none has it
Confidence
verified, proof one
Finding
storm/scmd#reading-a-switch-by-id

Finding: Reading a switch by id in storm: command-line switches

SCmdGetNum(id) walks the list at 0xc53f24, then the one at 0xc53f30, and returns the value word +0x3c of the first node whose id +0xc equals id, or 0 when none does. SCmdGetBool(id) is SCmdGetNum(id) != 0. SCmdGetString(id, buffer, size) raises error 0x57 and returns 0 for a null buffer or a zero size, writing 0 to buffer[0] first whenever the buffer is not null; otherwise it finds the node the same way, copies the string +0x3c points to with SStrCopy(buffer, string, size) when it is not null, and returns 1, or returns 0 with the buffer empty when no node has the id.

The derivation is in the doc.

Callers 1

Callees 2

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