aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Document.cxx2
1 files changed, 1 insertions, 1 deletions
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)));