Răsfoiți Sursa

check if next instruction exists

Kirill Kranz 10 luni în urmă
părinte
comite
d1438e0d39
1 a modificat fișierele cu 5 adăugiri și 0 ștergeri
  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;