From efaa1fb3a34966cdf258accfb6b9caac8a267edd Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Mon, 28 Jul 2014 22:12:35 +0200 Subject: [PATCH] fix textsplit core dump caused by interaction of new 1.20 code with little-tested camelcase splitting section --- src/common/textsplit.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/common/textsplit.cpp b/src/common/textsplit.cpp index cb73c645..83f5e828 100644 --- a/src/common/textsplit.cpp +++ b/src/common/textsplit.cpp @@ -729,7 +729,10 @@ bool TextSplit::text_to_words(const string &in) m_wordLen--; if (!doemit(false, it.getBpos())) return false; - m_wordStart--; + // m_wordstart could be 0 here if the span was reset + // for excessive length + if (m_wordStart) + m_wordStart--; m_wordLen++; } goto NORMALCHAR;