SStrToUnsigned
function · storm · primitive
- Address
0x64ade0· 70 bytes, up to0x64ae25- Signature
uint32_t __stdcall (const char *string)- Meaning
- Reads leading decimal digits as a wrapping 32-bit value; 0 for no digit, and error 0x57 for null
- Confidence
- verified, proof two
- Name from
- the community database (idb)
- Finding
- storm/strings#string-to-unsigned
- Test
storm::sstrtounsigned_whole
Finding: String to unsigned in storm: string conversions
SStrToUnsigned(s) (0x64ade0) reads decimal digits only, as SStrToInt tests them, accumulating
v·10 + d in wrapping 32-bit arithmetic. A first byte that is not a digit gives 0, so -5, +5,
5 and abc give 0: no sign or space is read. Digits stop at the first byte that is not one
(12x3 gives 12) and 4294967296 wraps to 0. A null s sets error 0x57 and gives 0.
The derivation is in the doc.
Callers 6
- CCommand_WorldTeleport unassigned
- RegisterAddOn ui
- ReadStockInterfaceNumber ui
- AddressList::Load net
- ConsoleCommandRepeat console
- CSimpleFontString::LoadXML ui
Callees 1
- SErrSetLastError storm
Calls and jumps by a bare address, from tables/calls.tsv.