From bd8a983747268783c1ab911667ae2f68a15e87b8 Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Wed, 4 Mar 2015 23:28:43 +0100 Subject: [PATCH] fix swprintf("%#.0o") --- src/functional/swprintf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/functional/swprintf.c b/src/functional/swprintf.c index 2abcb7c..243fae8 100644 --- a/src/functional/swprintf.c +++ b/src/functional/swprintf.c @@ -37,11 +37,11 @@ static const struct { { L"%0-5d", 12, L"12 " }, { L"%-05d", 12, L"12 " }, - /* ...explicit precision of 0 shall be no characters. */ + /* ...explicit precision of 0 shall be no characters except for alt-octal. */ { L"%.0d", 0, L"" }, { L"%.0o", 0, L"" }, { L"%#.0d", 0, L"" }, - { L"%#.0o", 0, L"" }, + { L"%#.0o", 0, L"0" }, { L"%#.0x", 0, L"" }, /* hex: test alt form and case */ -- 2.20.1