From 02658b1eccdc1a951e88877cfde528000afe2bb2 Mon Sep 17 00:00:00 2001 From: Birunthan Mohanathas Date: Tue, 17 Aug 2010 12:09:57 +0000 Subject: [PATCH] Fixed: Not being able to Substitute a quote character. The variable #QUOT# can be used in Substitutes. E.g. Substitute="#QUOT#":"blaa" --- Library/Measure.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Library/Measure.cpp b/Library/Measure.cpp index 0c78fd8f..10e11036 100644 --- a/Library/Measure.cpp +++ b/Library/Measure.cpp @@ -251,6 +251,7 @@ bool CMeasure::ParseSubstitute(std::wstring buffer) std::wstring CMeasure::ExtractWord(std::wstring& buffer) { std::wstring::size_type end = 0; + std::wstring::size_type pos = 0; std::wstring ret; if (buffer.empty()) return ret; @@ -294,6 +295,9 @@ std::wstring CMeasure::ExtractWord(std::wstring& buffer) buffer.erase(0, end + 1); } } + + while ((pos = ret.find_first_of(L"#QUOT#", pos)) != std::wstring::npos) ret.replace(pos, 6, L"\""); + return ret; }