Explorar o código

Fixed bug where hp1 object was used after being freed

J. Gareth "Curious Kit" Moreton %!s(int64=3) %!d(string=hai) anos
pai
achega
190c77e863
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      compiler/x86/aoptx86.pas

+ 2 - 1
compiler/x86/aoptx86.pas

@@ -5943,9 +5943,10 @@ unit aoptx86;
            if taicpu(hp1).opsize=S_B then
              begin
                taicpu(p).loadoper(0, taicpu(hp1).oper[1]^);
-               RemoveInstruction(hp1);
                if taicpu(hp1).oper[1]^.typ = top_reg then
                  AllocRegBetween(taicpu(hp1).oper[1]^.reg, p, hp2, UsedRegs);
+
+               RemoveInstruction(hp1);
              end
            else
              begin