From: Nicholas Nethercote Date: Wed, 15 May 2002 14:30:55 +0000 (+0000) Subject: Fix incredibly stupid bug. X-Git-Tag: svn/VALGRIND_1_0_3~194 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab8de9f4f7243161d5f174ac5d4eb484b22ab149;p=thirdparty%2Fvalgrind.git Fix incredibly stupid bug. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@270 --- diff --git a/cachegrind/cg_annotate.in b/cachegrind/cg_annotate.in index 30cc049ecb..bbbd36d419 100644 --- a/cachegrind/cg_annotate.in +++ b/cachegrind/cg_annotate.in @@ -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]); } diff --git a/vg_annotate.in b/vg_annotate.in index 30cc049ecb..bbbd36d419 100644 --- a/vg_annotate.in +++ b/vg_annotate.in @@ -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]); }