Преглед на файлове

Avoid wrong typecast by adding check that p1 is an instuction before casting it to taicpu

Pierre Muller преди 1 година
родител
ревизия
53bf5dc6ef
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      compiler/arm/aoptcpu.pas

+ 1 - 1
compiler/arm/aoptcpu.pas

@@ -2453,7 +2453,7 @@ Implementation
         Result:=true
       else
         begin
-          if SuperRegistersEqual(Reg, NR_DEFAULTFLAGS) then
+          if SuperRegistersEqual(Reg, NR_DEFAULTFLAGS) and (p1.typ = ait_instruction) then
             begin
               { Conditional instruction reads CPSR register }
               if (taicpu(p1).condition <> C_None) then