2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 05:57:52 +00:00

(..., "%03u", 2) was not zero filling

This commit is contained in:
Mark Andrews 2000-04-26 21:15:14 +00:00
parent d43730bbf2
commit d2ed254fb8

View File

@ -297,7 +297,9 @@ isc_print_vsnprintf(char *str, size_t size, const char *format, va_list ap) {
length = strlen(buf);
if (length < precision)
zeropad = precision - length;
if (width) {
else if (length < width && zero)
zeropad = width - length;
if (width != 0) {
pad = width - length -
zeropad - strlen(head);
if (pad < 0)