]> git.lyx.org Git - features.git/commitdiff
Fixed crash on searching for empty list inside empty list with ignore-format off...
authorTommaso Cucinotta <tommaso@lyx.org>
Tue, 2 Feb 2010 20:36:12 +0000 (20:36 +0000)
committerTommaso Cucinotta <tommaso@lyx.org>
Tue, 2 Feb 2010 20:36:12 +0000 (20:36 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33318 a592a061-630c-0410-9148-cb99ea01b6c8

src/lyxfind.cpp

index fb35386899263a29f100eeefcb5f21ad9250a504..0bfe8ef9582966c7f76f50fd8e9d5dd66c9ad0c4 100644 (file)
@@ -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;