Bläddra i källkod

Fixed bug where hp1 object was used after being freed

J. Gareth "Curious Kit" Moreton 3 år sedan
förälder
incheckning
190c77e863
1 ändrade filer med 2 tillägg och 1 borttagningar
  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