WebParser: Fix failure to replace [&Measure] variables in some cases

This commit is contained in:
Birunthan Mohanathas 2014-01-04 21:31:14 +02:00
parent cf62c509a1
commit 9e730bc7cf

View File

@ -727,13 +727,16 @@ PLUGIN_EXPORT void Reload(void* data, void* rm, double* maxValue)
std::wstring var = L"["; std::wstring var = L"[";
var += url.substr(si + 1, end - si); 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) if (result != var)
{ {
url.replace(start, end - start + 1, result); url.replace(start, end - start + 1, result);
start += result.length();
}
else
{
start = end;
} }
start = end;
} }
measure->url = url; measure->url = url;