]> git.rm.cloudns.org Git - xonotic/xonotic.git/commitdiff
fix the "error" handlign
authorRudolf Polzer <divverent@alientrap.org>
Mon, 30 Apr 2012 12:11:18 +0000 (14:11 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Mon, 30 Apr 2012 12:11:18 +0000 (14:11 +0200)
misc/tools/progs-analyzer.pl

index 9394cf171a5d6d2a25d2f85f02e7d67aeadcf023..f9c6411d3005c52c58283aab13afefb93c95bac7 100644 (file)
@@ -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;