commit 32dd44b209384d9e1b7f6b950cd53c784ec640bd
Author: Jean-Marc Lasgouttes <[email protected]>
Date:   Sun Nov 8 21:52:45 2015 +0100

    Improve fix to 57615915.
    
    Reset pointer to 0 as Georg suggested in #9804.

diff --git a/src/mathed/MathData.cpp b/src/mathed/MathData.cpp
index 01da608..7e302c8 100644
--- a/src/mathed/MathData.cpp
+++ b/src/mathed/MathData.cpp
@@ -527,7 +527,9 @@ void MathData::detachMacroParameters(DocIterator * cur, 
const size_type macroPos
        // optional arguments to be put back?
        pos_type p = macroPos + 1;
        size_t j = 0;
-       // WARNING: do not use macroInset below, the insert() call in the lopp 
will invalidate it!
+       // We do not want to use macroInset below, the insert() call in
+       // the loop will invalidate it.
+       macroInset = 0;
        for (; j < detachedArgs.size() && j < optionals; ++j) {
                // another non-empty parameter follows?
                bool canDropEmptyOptional = j >= lastNonEmptyOptional;

Reply via email to