* 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 -
This commit is contained in:
Jonas Maebe 2007-03-13 21:56:25 +00:00
parent 44752f5559
commit cb16e8d3d0

View File

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