From: Richard Heck Date: Sun, 31 Jul 2016 04:15:48 +0000 (-0400) Subject: Fix substitution for $$Contents. X-Git-Tag: 2.3.0alpha1~1192 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=6b97f2c0751ff79fc19ea0e11b4ef957fd71324c;p=features.git Fix substitution for $$Contents. The second argument here is the length of the string to replace, not the position of the final character. --- diff --git a/src/insets/ExternalSupport.cpp b/src/insets/ExternalSupport.cpp index f208a953d3..37c382a37f 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;