From 5b842cf3b11f10edf042bcc898bd397b4b12d8c8 Mon Sep 17 00:00:00 2001 From: justin1014 Date: Sun, 6 Oct 2002 18:33:35 +0000 Subject: [PATCH] made inttosizestr only display the + on GB shown on win9x. (sorry kichik, kinda undid some of your optimizaton -- I made this one slightly smaller though than the old one) git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1309 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/exehead/Ui.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/exehead/Ui.c b/Source/exehead/Ui.c index 725f0fb6..16c92824 100644 --- a/Source/exehead/Ui.c +++ b/Source/exehead/Ui.c @@ -735,9 +735,11 @@ static char * NSISCALL inttosizestr(int kb, char *str) { char sh=20; char c='G'; + char s=0;; if (kb < 1024) { sh=0; c='K'; } else if (kb < 1024*1024) { sh=10; c='M'; } - wsprintf(str+mystrlen(str),"%d.%d%cB%c",kb>>sh,((kb*10)>>sh)%10,c,GetVersion()&0x80000000?'+':' '); + else if (GetVersion()&0x80000000) s='+';//only display the + on GB shown on win9x. + wsprintf(str+mystrlen(str),"%d.%d%cB%c",kb>>sh,((kb*10)>>sh)%10,c,s); return str; }