aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2015-10-17 12:09:21 +0200
committerSebastian Geerken <devnull@localhost>2015-10-17 12:09:21 +0200
commit41fd1ce51b281bd7814909b00ddb1e6fd057f350 (patch)
treed326f5fda8b193bded096a141b77b32ebc06954f
parent4ef027bd6d0ae68ed96c408b4fe5a8a3181c60ab (diff)
Fixed a bug in Textblock::findParagraphOfWord.
-rw-r--r--dw/textblock.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/dw/textblock.cc b/dw/textblock.cc
index e5561f6a..2cf4d597 100644
--- a/dw/textblock.cc
+++ b/dw/textblock.cc
@@ -1695,7 +1695,7 @@ int Textblock::findParagraphOfWord (int wordIndex)
if (wordIndex < 0 || wordIndex >= words->size () ||
// It may be that the paragraphs list is incomplete. But look
// also at fillParagraphs, where this method is called.
- (paragraphs->size () > 0 &&
+ (paragraphs->size () == 0 ||
wordIndex > paragraphs->getLastRef()->lastWord))
return -1;