Browse Source

* reset CurrMemPos after each NewExeSection to ensure each segment starts at 0 offset

git-svn-id: trunk@42569 -
nickysn 6 years ago
parent
commit
34b3af7e92
1 changed files with 4 additions and 1 deletions
  1. 4 1
      compiler/ogomf.pas

+ 4 - 1
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);