Avoid invalid typecast if hp is not an instruction

git-svn-id: trunk@49273 -
This commit is contained in:
pierre 2021-04-26 21:50:53 +00:00
parent 0670980981
commit c2faf6a8fd

View File

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