Browse Source

check if next instruction exists

Kirill Kranz 10 months ago
parent
commit
d1438e0d39
1 changed files with 5 additions and 0 deletions
  1. 5 0
      compiler/mips/aasmcpu.pas

+ 5 - 0
compiler/mips/aasmcpu.pas

@@ -698,10 +698,15 @@ begin
           firstReg:= taicpu(p).oper[0]^.reg;
 
           x:= l.next;
+          if not assigned(x) then goto skip;
+          
           pp:= tai(x);
     
           while pp.typ <> ait_instruction do begin
+            
             x:= x.next;
+            if not assigned(x) then goto skip;
+
             pp:= tai(x);
           end;