diff --git a/src/common/textsplit.cpp b/src/common/textsplit.cpp index 6807a7a2..f9dc87e1 100644 --- a/src/common/textsplit.cpp +++ b/src/common/textsplit.cpp @@ -142,6 +142,8 @@ static inline int whatcc(unsigned int c) } else { vector::iterator it = lower_bound(vpuncblocks.begin(), vpuncblocks.end(), c); + if (it == vpuncblocks.end()) + return LETTER; if (c == *it) return SPACE; if ((it - vpuncblocks.begin()) % 2 == 1) {