]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix incredibly stupid bug.
authorNicholas Nethercote <njn@valgrind.org>
Wed, 15 May 2002 14:30:55 +0000 (14:30 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Wed, 15 May 2002 14:30:55 +0000 (14:30 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@270

cachegrind/cg_annotate.in
vg_annotate.in

index 30cc049ecbd2e57e73286d406ca4da1113727d62..bbbd36d419ca853a4cd789a68e2ffba2db131747 100644 (file)
@@ -604,7 +604,7 @@ sub print_summary_and_fn_totals ()
 
         # Stop when we've reached all the thresholds
         my $reached_all_thresholds = 1;
-        foreach my $i (scalar @thresholds - 1) {
+        foreach my $i (0 .. scalar @thresholds - 1) {
             my $prop = $curr_totals[$i] * 100 / $summary_CC->[$sort_order[$i]];
             $reached_all_thresholds &= ($prop >= $thresholds[$i]);
         }
index 30cc049ecbd2e57e73286d406ca4da1113727d62..bbbd36d419ca853a4cd789a68e2ffba2db131747 100644 (file)
@@ -604,7 +604,7 @@ sub print_summary_and_fn_totals ()
 
         # Stop when we've reached all the thresholds
         my $reached_all_thresholds = 1;
-        foreach my $i (scalar @thresholds - 1) {
+        foreach my $i (0 .. scalar @thresholds - 1) {
             my $prop = $curr_totals[$i] * 100 / $summary_CC->[$sort_order[$i]];
             $reached_all_thresholds &= ($prop >= $thresholds[$i]);
         }