commit 6b97f2c0751ff79fc19ea0e11b4ef957fd71324c
Author: Richard Heck <[email protected]>
Date:   Sun Jul 31 00:15:48 2016 -0400

    Fix substitution for $$Contents.
    
    The second argument here is the length of the string to replace,
    not the position of the final character.
---
 src/insets/ExternalSupport.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/insets/ExternalSupport.cpp b/src/insets/ExternalSupport.cpp
index f208a95..37c382a 100644
--- a/src/insets/ExternalSupport.cpp
+++ b/src/insets/ExternalSupport.cpp
@@ -200,7 +200,7 @@ string const doSubstitution(InsetExternalParams const & 
params,
 
                size_t const pos = result.find("$$Contents(\"");
                size_t const end = result.find("\")", pos);
-               result.replace(pos, end + 2, contents);
+               result.replace(pos, end + 2- pos, contents);
        }
 
        return result;

Reply via email to