Browse Source

+ initialize TWasmExeOutput.FWasmSections

Nikolay Nikolov 1 year ago
parent
commit
5583781f47
1 changed files with 4 additions and 0 deletions
  1. 4 0
      compiler/ogwasm.pas

+ 4 - 0
compiler/ogwasm.pas

@@ -4061,11 +4061,15 @@ implementation
       end;
 
     constructor TWasmExeOutput.create;
+      var
+        i: TWasmSectionID;
       begin
         inherited create;
         CObjData:=TWasmObjData;
         MaxMemPos:=$FFFFFFFF;
         FFuncTypes:=TWasmFuncTypeTable.Create;
+        for i in TWasmSectionID do
+          FWasmSections[i] := tdynamicarray.create(SectionDataMaxGrow);
       end;
 
     destructor TWasmExeOutput.destroy;