From a801b2c5093a0f0af87df7c3d2f5c2b2642d75b8 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Tue, 2 Sep 2003 12:03:40 +0000 Subject: Fixed hang when searching backwards in UTF-8 file for string that is not present. --- src/Document.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/Document.cxx b/src/Document.cxx index 487262f8a..78c84d485 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -1012,7 +1012,7 @@ long Document::FindText(int minPos, int maxPos, const char *s, } } pos += increment; - if (dbcsCodePage) { + if (dbcsCodePage && (pos >= 0)) { // Ensure trying to match from start of character pos = MovePositionOutsideChar(pos, increment, false); } -- cgit v1.2.3