[pkg-wine-party] [SCM] Debian Wine packaging branch, wheezy, updated. wine-1.4-7-302-gb61b690
Alexandre Julliard
julliard at winehq.org
Sun Jun 17 20:01:52 UTC 2012
The following commit has been merged in the wheezy branch:
commit e25033b456316c815da8e96dd04d9204e4d02467
Author: Piotr Caban <piotr at codeweavers.com>
Date: Mon Mar 12 19:49:11 2012 +0100
msvcrt: Fixed printf behaviour on hexadecimal, zero-padded numbers.
(cherry picked from commit 79c19aef299432f39e435c9c98be3ac613ea762a)
diff --git a/dlls/msvcrt/printf.h b/dlls/msvcrt/printf.h
index 5c49739..b1cb53f 100644
--- a/dlls/msvcrt/printf.h
+++ b/dlls/msvcrt/printf.h
@@ -508,8 +508,14 @@ int FUNC_NAME(pf_printf)(FUNC_NAME(puts_clbk) pf_puts, void *puts_ctx, const API
i = 0;
} else if(flags.Format && strchr("diouxX", flags.Format)) {
APICHAR *tmp = buf;
- int max_len = (flags.FieldLength>flags.Precision ? flags.FieldLength : flags.Precision) + 10;
+ int max_len;
+
+ /* 0 padding is added after '0x' in Alternate flag is in use */
+ if((flags.Format=='x' || flags.Format=='X') && flags.PadZero && flags.Alternate
+ && !flags.LeftAlign && flags.Precision<flags.FieldLength-2)
+ flags.Precision = flags.FieldLength - 2;
+ max_len = (flags.FieldLength>flags.Precision ? flags.FieldLength : flags.Precision) + 10;
if(max_len > sizeof(buf)/sizeof(APICHAR))
tmp = HeapAlloc(GetProcessHeap(), 0, max_len);
if(!tmp)
--
Debian Wine packaging
More information about the pkg-wine-party
mailing list