From: Szabolcs Nagy Date: Tue, 6 Jan 2015 15:59:01 +0000 (+0100) Subject: fix snprintf "%#.0o" test X-Git-Url: http://nsz.repo.hu/git/?p=libc-test;a=commitdiff_plain;h=fb642f74e29e37ca2d2188627d9c66525b3cf8e1 fix snprintf "%#.0o" test see musl commit b91cdbe2bc8b626aa04dc6e3e84345accf34e4b1 --- diff --git a/src/functional/snprintf.c b/src/functional/snprintf.c index 600cd11..c96f151 100644 --- a/src/functional/snprintf.c +++ b/src/functional/snprintf.c @@ -36,11 +36,11 @@ static const struct { { "%0-5d", 12, "12 " }, { "%-05d", 12, "12 " }, - /* ...explicit precision of 0 shall be no characters. */ + /* ...explicit precision of 0 shall be no characters except for alt-octal. */ { "%.0d", 0, "" }, { "%.0o", 0, "" }, { "%#.0d", 0, "" }, - { "%#.0o", 0, "" }, + { "%#.0o", 0, "0" }, { "%#.0x", 0, "" }, /* ...but it still has to honor width and flags. */