__store_str
function · crt · primitive
- Address
0x4139e7· 39 bytes, up to0x413a0d- Signature
void __cdecl (const char *s, char **out, uint32_t *left)- Meaning
- Copies a string's bytes while room is left
- Confidence
- verified, proof one
- Name from
- the community database (idb)
- Finding
- crt/time#writing-numbers-and-strings
- Test
crt::crt_strftime_difftest,crt::crt_strftime_patterns_difftest
Finding: Writing numbers and strings in crt: calendar time
__store_str copies a string's bytes while room is left. Without __no_lead_zeros, __store_num
writes exactly the count of the number's last digits, zero-padded, when the count is below the
room, and otherwise sets the room to 0, which ends the format. With it, __store_number writes
the digits low first while more than one byte of room is left, stopping after a quotient of 0 or
less, then reverses them by a loop that swaps before it tests: with room for no digit it swaps
the last byte written with the one after it, so the output ends in whatever the buffer held there.
A digit is '0' plus the signed remainder: a negative number gives bytes below '0'.
The derivation is in the doc.
Callers 1
- __expandtime crt
Callees 0
None by a direct call or jump.
Calls and jumps by a bare address, from tables/calls.tsv.