From c037839306aa07ce2bf0caba0dfd987e7e546928 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Mon, 27 Sep 2004 13:24:18 +0000 Subject: Fix for bug 1025190 where a whole word find would match on a word at the end of the file despite the word having an additional non-matching letter. --- src/Document.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Document.cxx b/src/Document.cxx index a8cca8a00..76fa456cc 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -884,7 +884,7 @@ bool Document::IsWordStartAt(int pos) { * the next character is of a different character class. */ bool Document::IsWordEndAt(int pos) { - if (pos < Length() - 1) { + if (pos < Length()) { charClassification ccPrev = WordCharClass(CharAt(pos-1)); return (ccPrev == ccWord || ccPrev == ccPunctuation) && (ccPrev != WordCharClass(CharAt(pos))); -- cgit v1.2.3