sections always end with EW_RET which will cause ExecuteCodeSegment to return before MulDiv is called with progress_bar_len=0 and even if it is 0, MulDiv will just return -1

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5110 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2007-04-20 20:50:33 +00:00
parent acbd53f905
commit fa5602f290

View file

@ -85,7 +85,7 @@ int NSISCALL ExecuteCodeSegment(int pos, HWND hwndProgress)
{
extern int progress_bar_pos, progress_bar_len;
progress_bar_pos+=rv;
SendMessage(hwndProgress,PBM_SETPOS,MulDiv(progress_bar_pos,30000,progress_bar_len+!progress_bar_len),0);
SendMessage(hwndProgress,PBM_SETPOS,MulDiv(progress_bar_pos,30000,progress_bar_len),0);
}
}
return 0;