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
This commit is contained in:
parent
e530408b95
commit
1faa72a2d2
1 changed files with 3 additions and 7 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue