From a641b640412d2c4ec80bfeeba475fb25e25428c4 Mon Sep 17 00:00:00 2001 From: Brian Ferguson Date: Tue, 4 Sep 2012 10:17:13 -0600 Subject: [PATCH] More tweaks --- Library/Measure.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Library/Measure.cpp b/Library/Measure.cpp index bd2351ea..477521f7 100644 --- a/Library/Measure.cpp +++ b/Library/Measure.cpp @@ -347,6 +347,11 @@ bool CMeasure::ParseSubstitute(std::wstring buffer) if (wcscmp(word1.c_str(), word2.c_str()) != 0) { + if (m_RegExpSubstitute && word1.empty()) + { + word1 = L"^$"; + } + m_Substitute.push_back(word1); m_Substitute.push_back(word2); } @@ -423,11 +428,6 @@ std::wstring CMeasure::ExtractWord(std::wstring& buffer) buffer.erase(0, end); - if (m_RegExpSubstitute && ret.empty()) - { - ret = L"^$"; - } - return ret; }