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;
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;