From 45f12e010e97704ab8f7b6fb932ebe14c5596779 Mon Sep 17 00:00:00 2001 From: fvogel Date: Thu, 11 Oct 2018 20:00:40 +0000 Subject: [PATCH 349/693] Fix [4b555aca34]: text search -all hangs and eats all memory --- generic/tkText.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generic/tkText.c b/generic/tkText.c index d43bef6b0..6c5262426 100644 --- a/generic/tkText.c +++ b/generic/tkText.c @@ -6070,8 +6070,8 @@ SearchCore( matchOffset = p - startOfLine; if (searchSpecPtr->all && - !searchSpecPtr->foundMatchProc(lineNum, searchSpecPtr, - lineInfo, theLine, matchOffset, matchLength)) { + (!searchSpecPtr->foundMatchProc(lineNum, searchSpecPtr, + lineInfo, theLine, matchOffset, matchLength) || (matchLength == 0)) ) { /* * We reached the end of the search. */ -- 2.19.1