The branch, master, has been updated.

- Log -----------------------------------------------------------------

commit ec078bd29d81cc22a23bfeeb08a288099c0ef70c
Author: Juergen Spitzmueller <sp...@lyx.org>
Date:   Mon Sep 17 09:32:47 2012 +0200

    Do not search for empty string

diff --git a/src/LaTeX.cpp b/src/LaTeX.cpp
index ecd255f..5623bd2 100644
--- a/src/LaTeX.cpp
+++ b/src/LaTeX.cpp
@@ -1044,7 +1044,7 @@ int iterateLine(string const token, regex const reg, 
string const closing,
        // result = -1 means we did not find a fragment!
        int result = -1;
        int last_match_pos = -1;
-       if (token.find(last_match) != string::npos)
+       if (!last_match.empty() && token.find(last_match) != string::npos)
                last_match_pos = int(token.find(last_match));
        if (fragment) {
                if (last_match_pos > fragment_pos)
@@ -1054,6 +1054,7 @@ int iterateLine(string const token, regex const reg, 
string const closing,
        } else
                if (last_match_pos < fragment_pos)
                        result = fragment_pos;
+
        return result;
 }
 

-----------------------------------------------------------------------

Summary of changes:
 src/LaTeX.cpp |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
The LyX Source Repository

Reply via email to