From 114ffac2193093764276bb881324da01f0cbd7ff Mon Sep 17 00:00:00 2001 From: graydon Date: Tue, 13 Sep 2005 21:25:25 +0000 Subject: 2005-09-12 Graydon Hoare PR 1306 * tapsets.cxx (dwflpp::iterate_over_srcfile_lines): Fix two off-by-one errors in previous change. --- ChangeLog | 6 ++++++ tapsets.cxx | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index e91f1b1a..3b32b3d3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,12 @@ recursion sequence. * testsuite/buildok/nineteen.stp: New test case. +2005-09-12 Graydon Hoare + + PR 1306 + * tapsets.cxx (dwflpp::iterate_over_srcfile_lines): Fix two + off-by-one errors in previous change. + 2005-09-12 Graydon Hoare PR 1306 diff --git a/tapsets.cxx b/tapsets.cxx index d7a2fb9b..7f3efcc1 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -599,7 +599,7 @@ dwflpp srcfile, lineno, 0, &srcsp, &nsrcs)); - if (need_single_match && nsrcs > 0) + if (need_single_match && nsrcs > 1) { // We wanted a single line record (a unique address for the // line) and we got a bunch of line records. We're going to @@ -610,7 +610,7 @@ dwflpp int lo_try = -1; int hi_try = -1; - for (size_t i = 0; i < 5; ++i) + for (size_t i = 1; i < 6; ++i) { if (lo_try == -1 && has_single_line_record(srcfile, lineno - i)) lo_try = lineno - i; -- cgit