소스 검색

Avoid invalid typecast if hp is not an instruction

git-svn-id: trunk@49273 -
pierre 4 년 전
부모
커밋
c2faf6a8fd
1개의 변경된 파일5개의 추가작업 그리고 4개의 파일을 삭제
  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;