From 40a48101d36fd933902a527566dfd827e1eb0bd5 Mon Sep 17 00:00:00 2001 From: "Tim J. Robbins" Date: Fri, 11 Oct 2002 23:04:59 +0000 Subject: [PATCH] Non-negative amounts should not have an extra space in front of them when the `(' flag is used. --- lib/libc/stdlib/strfmon.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/libc/stdlib/strfmon.c b/lib/libc/stdlib/strfmon.c index b74baf0f9d5..c0638fc06e4 100644 --- a/lib/libc/stdlib/strfmon.c +++ b/lib/libc/stdlib/strfmon.c @@ -291,12 +291,8 @@ strfmon(char * __restrict s, size_t maxsize, const char * __restrict format, while (pad_size-- > 0) PRINT(' '); - if (sign_posn == 0) { - if (flags & IS_NEGATIVE) - PRINT('('); - else - PRINT(' '); - } + if (sign_posn == 0 && (flags & IS_NEGATIVE)) + PRINT('('); if (cs_precedes == 1) { if (sign_posn == 1 || sign_posn == 3) {