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)];