From b2c2d86a42dad4296d6d34b072976d80c1a3b605 Mon Sep 17 00:00:00 2001 From: Magnus Olsen Date: Sun, 4 Jun 2006 19:20:20 +0000 Subject: [PATCH] fixing one more of wine msvcrt printf test svn path=/trunk/; revision=22219 --- reactos/lib/rtl/sprintf.c | 2 +- reactos/lib/rtl/swprintf.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/lib/rtl/sprintf.c b/reactos/lib/rtl/sprintf.c index 20de5772adc..441bec3ffd2 100644 --- a/reactos/lib/rtl/sprintf.c +++ b/reactos/lib/rtl/sprintf.c @@ -122,7 +122,7 @@ number(char * buf, char * end, long long num, int base, int size, int precision, size--; } i = 0; - if (num == 0) + if ((num == 0) && (precision !=0)) tmp[i++] = '0'; else while (num != 0) tmp[i++] = digits[do_div(&num,base)]; diff --git a/reactos/lib/rtl/swprintf.c b/reactos/lib/rtl/swprintf.c index cbe3356c962..6ba1a925028 100644 --- a/reactos/lib/rtl/swprintf.c +++ b/reactos/lib/rtl/swprintf.c @@ -122,7 +122,7 @@ number(wchar_t * buf, wchar_t * end, long long num, int base, int size, int prec size--; } i = 0; - if (num == 0) + if ((num == 0) && (precision !=0)) tmp[i++] = L'0'; else while (num != 0) tmp[i++] = digits[do_div(&num,base)];