From ff063a0be9cdcd50b6b4fb8e79422e68fc1f792a Mon Sep 17 00:00:00 2001 From: kichik Date: Thu, 20 Nov 2008 19:20:33 +0000 Subject: [PATCH] applied patch #1982084 - wrong UI behaviour on size texts (VS2005) git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5768 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/exehead/Ui.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/exehead/Ui.c b/Source/exehead/Ui.c index 07baceba..5b26e554 100644 --- a/Source/exehead/Ui.c +++ b/Source/exehead/Ui.c @@ -837,8 +837,14 @@ static void NSISCALL SetSizeText(int dlgItem, int prefix, unsigned kb) if (kb < (0xFFFFFFFF - ((1 << 20) / 20))) // check for overflow kb += (1 << sh) / 20; // round numbers for better display (e.g. 1.59 => 1.6) +#if _MSC_VER == 1200 // patch #1982084 wsprintf( GetNSISString(g_tmp, prefix) + mystrlen(g_tmp), +#else + GetNSISString(g_tmp, prefix); + wsprintf( + g_tmp + mystrlen(g_tmp), +#endif "%u.%u%s%s", kb >> sh, (((kb & 0x00FFFFFF) * 10) >> sh) % 10, // 0x00FFFFFF mask is used to