From: Rudolf Polzer Date: Mon, 30 Apr 2012 12:11:18 +0000 (+0200) Subject: fix the "error" handlign X-Git-Tag: xonotic-v0.7.0~55^2~30^2~2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b4687ec0d63d2aceba8b30f22bd884644d4ac681;p=xonotic%2Fxonotic.git fix the "error" handlign --- diff --git a/misc/tools/progs-analyzer.pl b/misc/tools/progs-analyzer.pl index 9394cf17..f9c6411d 100644 --- a/misc/tools/progs-analyzer.pl +++ b/misc/tools/progs-analyzer.pl @@ -269,6 +269,18 @@ sub run_nfa($$$$$$) { last; } + elsif($c->{iscall}) + { + my $func = $s->{a}; + my $funcid = $progs->{globals}[$func]{v}{int}; + my $funcobj = $progs->{functions}[$funcid]; + if($funcobj && $funcobj->{first_statement} < 0) # builtin + { + my $def = $progs->{globaldef_byoffset}->($func); + last + if $def->{debugname} eq 'error'; + } + } elsif($c->{isjump}) { if($c->{isconditional}) @@ -769,12 +781,6 @@ sub find_uninitialized_locals($$) } } } - else # builtin - { - my $def = $progs->{globaldef_byoffset}->($func); - return 1 - if $def->{debugname} eq 'error'; - } } return 0;