mpaland / printf

Tiny, fast, non-dependent and fully loaded printf implementation for embedded systems. Extensive test suite passing.
MIT License
2.47k stars 452 forks source link

printf_("%#.0o", 0) produces "", should produce "0" #109

Open eyalroz opened 3 years ago

eyalroz commented 3 years ago

According to cppreference.com, and as implemented in glibc, the alternative mode for %o must ensure at least one leading zero is printed. Thus,

printf_("%#.0o", 0)

must produce "0", not "". And yet - the latter is produced.