From 9e730bc7cf820bf1599055b1d1adb65b51a74f6a Mon Sep 17 00:00:00 2001 From: Birunthan Mohanathas Date: Sat, 4 Jan 2014 21:31:14 +0200 Subject: [PATCH] WebParser: Fix failure to replace [&Measure] variables in some cases --- Plugins/PluginWebParser/WebParser.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Plugins/PluginWebParser/WebParser.cpp b/Plugins/PluginWebParser/WebParser.cpp index bbfbd8c4..6b3b1f04 100644 --- a/Plugins/PluginWebParser/WebParser.cpp +++ b/Plugins/PluginWebParser/WebParser.cpp @@ -727,13 +727,16 @@ PLUGIN_EXPORT void Reload(void* data, void* rm, double* maxValue) std::wstring var = L"["; var += url.substr(si + 1, end - si); - std::wstring result = RmReplaceVariables(rm, var.c_str()); + const std::wstring result = RmReplaceVariables(rm, var.c_str()); if (result != var) { url.replace(start, end - start + 1, result); + start += result.length(); + } + else + { + start = end; } - - start = end; } measure->url = url;