Selaa lähdekoodia

Avoid invalid typecast if hp is not an instruction

git-svn-id: trunk@49273 -
pierre 4 vuotta sitten
vanhempi
commit
c2faf6a8fd
1 muutettua tiedostoa jossa 5 lisäystä ja 4 poistoa
  1. 5 4
      compiler/arm/rgcpu.pas

+ 5 - 4
compiler/arm/rgcpu.pas

@@ -400,10 +400,11 @@ unit rgcpu;
         level := 0;
         while assigned(hp) do
           begin
-            if IsIT(taicpu(hp).opcode) then
-              break
-            else if hp.typ=ait_instruction then
-              inc(level);
+            if hp.typ=ait_instruction then
+              if IsIT(taicpu(hp).opcode) then
+                break
+              else
+                inc(level);
 
             hp:=tai(hp.Previous);
           end;