فهرست منبع

* nothingn has a complexity of 0
* stop complexity calculation if we get to the end of a series of a
statements instead of crashing

git-svn-id: trunk@6830 -

Jonas Maebe 18 سال پیش
والد
کامیت
cb16e8d3d0
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 2 1
      compiler/nutils.pas

+ 2 - 1
compiler/nutils.pas

@@ -555,7 +555,7 @@ implementation
     function node_complexity(p: tnode): cardinal;
       begin
         result := 0;
-        while true do
+        while assigned(p) do
           begin
             case p.nodetype of
               temprefn,
@@ -639,6 +639,7 @@ implementation
               tempdeleten,
               ordconstn,
               pointerconstn,
+              nothingn,
               niln:
                 exit;
               else