From b8af0d1cfd4f0ee3969757464f4160248647a36e Mon Sep 17 00:00:00 2001 From: Tommaso Cucinotta Date: Tue, 2 Feb 2010 20:36:12 +0000 Subject: [PATCH] Fixed crash on searching for empty list inside empty list with ignore-format off (bug #6500). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33318 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/lyxfind.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp index fb35386899..0bfe8ef958 100644 --- a/src/lyxfind.cpp +++ b/src/lyxfind.cpp @@ -946,6 +946,8 @@ int findAdvFinalize(DocIterator & cur, MatchStringAdv const & match) // Compute the match length int len = 1; + if (cur.pos() + len > cur.lastpos()) + return 0; LYXERR(Debug::FIND, "verifying unmatch with len = " << len); while (cur.pos() + len <= cur.lastpos() && match(cur, len) == 0) { ++len; -- 2.39.5