From 344a183c142c41b57157360ab141236978838bc4 Mon Sep 17 00:00:00 2001 From: Magnus Olsen Date: Sun, 25 Dec 2005 02:55:18 +0000 Subject: [PATCH] Adding same bug fix as 20303 to vfprintf.c it did have same problem. thx for GvG bugfix. svn path=/trunk/; revision=20326 --- reactos/lib/crt/stdio/vfprintf.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/reactos/lib/crt/stdio/vfprintf.c b/reactos/lib/crt/stdio/vfprintf.c index ead15b80458..e470a18aaa4 100644 --- a/reactos/lib/crt/stdio/vfprintf.c +++ b/reactos/lib/crt/stdio/vfprintf.c @@ -367,13 +367,20 @@ static int numberf(FILE * f, double __n, char exp_sign, int size, int precision } tmp = buf; + if ( type & ZEROTRUNC && ((type & SPECIAL) != SPECIAL) ) { j = 0; - while ( j < i && ( *tmp == '0' || *tmp == '.' )) { + while ( j < i && *tmp == L'0' ) { + tmp++; + i--; + } + if ( j < i && *tmp == L'.' ) { tmp++; i--; } } + + // else // while (i < precision--) // putc('0', f);