* 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;
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