From fa5602f290e042c43bce8cd716d6b37e95fdcc17 Mon Sep 17 00:00:00 2001 From: kichik Date: Fri, 20 Apr 2007 20:50:33 +0000 Subject: [PATCH] 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 --- Source/exehead/exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/exehead/exec.c b/Source/exehead/exec.c index 1bfff151..bf48f92a 100644 --- a/Source/exehead/exec.c +++ b/Source/exehead/exec.c @@ -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;