From 1faa72a2d2359cf31709fa2484e7665c90bcc562 Mon Sep 17 00:00:00 2001 From: kichik Date: Sun, 30 Jul 2006 11:58:22 +0000 Subject: [PATCH] fixed bug #1468852 - Wrong "Total size" reported if greater than 2GB git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4714 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/build.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Source/build.cpp b/Source/build.cpp index ffa716e7..a2ad2ee2 100644 --- a/Source/build.cpp +++ b/Source/build.cpp @@ -2472,7 +2472,7 @@ int CEXEBuild::write_output(void) INFO_MSG("\nUsing %s%s compression.\n\n", compressor->GetName(), build_compress_whole?" (compress whole)":""); #endif - int total_usize=m_exehead_original_size; + unsigned int total_usize=m_exehead_original_size; INFO_MSG("EXE header size: %10d / %d bytes\n",m_exehead_size,m_exehead_original_size); @@ -2621,12 +2621,8 @@ int CEXEBuild::write_output(void) } INFO_MSG("\n"); { -#ifdef _WIN32 - int pc=MulDiv(ftell(fp),1000,total_usize); -#else - int pc=(int)(((long long)ftell(fp)*1000)/(total_usize)); -#endif - INFO_MSG("Total size: %10d / %d bytes (%d.%d%%)\n", + UINT pc=(UINT)(((UINT64)ftell(fp)*1000)/(total_usize)); + INFO_MSG("Total size: %10u / %u bytes (%u.%u%%)\n", ftell(fp),total_usize,pc/10,pc%10); } fclose(fp);