From 34b3af7e9249c80bfd29928b6e85d722426084f9 Mon Sep 17 00:00:00 2001 From: nickysn Date: Fri, 2 Aug 2019 23:22:59 +0000 Subject: [PATCH] * reset CurrMemPos after each NewExeSection to ensure each segment starts at 0 offset git-svn-id: trunk@42569 - --- compiler/ogomf.pas | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/compiler/ogomf.pas b/compiler/ogomf.pas index ca47c12508..217ed374f8 100644 --- a/compiler/ogomf.pas +++ b/compiler/ogomf.pas @@ -3775,7 +3775,10 @@ cleanup: begin inherited MemPos_Start; for i:=0 to ExeSectionList.Count-1 do - MemPos_ExeSection(TExeSection(ExeSectionList[i])); + begin + MemPos_ExeSection(TExeSection(ExeSectionList[i])); + CurrMemPos:=0; + end; end; procedure TNewExeOutput.GenerateLibraryImports(ImportLibraryList: TFPHashObjectList);