From ab8de9f4f7243161d5f174ac5d4eb484b22ab149 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Wed, 15 May 2002 14:30:55 +0000 Subject: [PATCH] Fix incredibly stupid bug. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@270 --- cachegrind/cg_annotate.in | 2 +- vg_annotate.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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]); } -- 2.47.2