Browse Source

Fix bug report #35065 using provided patch by J. Gareth Moreton

git-svn-id: trunk@41310 -
pierre 6 years ago
parent
commit
d4e059bd41
1 changed files with 3 additions and 2 deletions
  1. 3 2
      compiler/aasmtai.pas

+ 3 - 2
compiler/aasmtai.pas

@@ -2926,9 +2926,10 @@ implementation
         i : integer;
         i : integer;
       begin
       begin
         inherited ppuload(t,ppufile);
         inherited ppuload(t,ppufile);
-        { hopefully, we don't get problems with big/litte endian here when cross compiling :/ }
+        { hopefully, we don't get problems with big/little endian here when cross compiling :/ }
         ppufile.getdata(condition,sizeof(tasmcond));
         ppufile.getdata(condition,sizeof(tasmcond));
-        allocate_oper(ppufile.getbyte);
+        ops := ppufile.getbyte;
+        allocate_oper(ops);
         for i:=0 to ops-1 do
         for i:=0 to ops-1 do
           ppuloadoper(ppufile,oper[i]^);
           ppuloadoper(ppufile,oper[i]^);
         opcode:=tasmop(ppufile.getword);
         opcode:=tasmop(ppufile.getword);