Pārlūkot izejas kodu

* avoid range check error in TVMTBuilder.intf_optimize_vtbls by early bailing out if a class has no interfaces

florian 1 gadu atpakaļ
vecāks
revīzija
c3a3cfe80f
1 mainītis faili ar 2 papildinājumiem un 0 dzēšanām
  1. 2 0
      compiler/nobj.pas

+ 2 - 0
compiler/nobj.pas

@@ -680,6 +680,8 @@ implementation
         cji: boolean;
       begin
         ImplIntfCount:=_class.ImplementedInterfaces.count;
+        if ImplIntfCount=0 then
+          exit;
         SetLength(compats,ImplIntfCount);
         SetLength(aequals,ImplIntfCount);
         SetLength(impls,ImplIntfCount);