_write_multi_char
function · crt · boundary
- Address
0x74331b· 49 bytes, up to0x74334b- Signature
void __cdecl (int ch, int n, FILE *stream, int *count)- Meaning
- Puts a byte n times through _write_char, stopping once the count is -1
- Confidence
- verified, proof one
- Name from
- the community database (idb)
- Finding
- crt/printf#padding-sign-and-text
- Test
crt::crt_sprintf_states_difftest,crt::crt_sprintf_difftest,crt::crt_sprintf_float_difftest,crt::crt_vsnprintf_difftest
Finding: Padding, sign and text in crt: formatted output
Every conversion but n ends the same way. The pad is the width less the prefix and the text, in 32
bits. Without - or 0 the pad goes out as spaces; then the prefix; then, with 0 and without
-, the pad as zeros; then the text; then, with -, the pad as spaces. A signed conversion
(d, i, e, f, g) takes the prefix - for a negative value, else + with +, else a
space with the space flag. So 0 pads a string or a character with zeros too. A write that finds
no room sets the count to -1, and the engine returns -1 before the next format byte; otherwise
it returns the bytes written.
The derivation is in the doc.
Callers 1
- __output crt
Callees 1
- _write_char crt
Calls and jumps by a bare address, from tables/calls.tsv.