Forráskód Böngészése

* when checking whether the last parameter is an array of const then first check whether there is a parameter at all

Sven/Sarah Barth 1 hete
szülő
commit
6c8e6e2d2a
1 módosított fájl, 1 hozzáadás és 0 törlés
  1. 1 0
      compiler/ncal.pas

+ 1 - 0
compiler/ncal.pas

@@ -4527,6 +4527,7 @@ implementation
 
 
            { Change loading of array of const to varargs }
            { Change loading of array of const to varargs }
            if assigned(left) and
            if assigned(left) and
+              (procdefinition.paras.count>0) and
               is_array_of_const(tparavarsym(procdefinition.paras[procdefinition.paras.count-1]).vardef) and
               is_array_of_const(tparavarsym(procdefinition.paras[procdefinition.paras.count-1]).vardef) and
               (procdefinition.proccalloption in cdecl_pocalls) then
               (procdefinition.proccalloption in cdecl_pocalls) then
              convert_carg_array_of_const;
              convert_carg_array_of_const;