WebParser: Tweaks

This commit is contained in:
Birunthan Mohanathas 2014-01-04 21:46:00 +02:00
parent 9e730bc7cf
commit 39c6c62abd

View File

@ -725,18 +725,12 @@ PLUGIN_EXPORT void Reload(void* data, void* rm, double* maxValue)
if (end == std::wstring::npos) break; if (end == std::wstring::npos) break;
std::wstring var = L"["; std::wstring var = L"[";
var += url.substr(si + 1, end - si); var.append(url, si + 1, end - si);
const std::wstring result = RmReplaceVariables(rm, var.c_str()); const WCHAR* result = RmReplaceVariables(rm, var.c_str());
if (result != var) const size_t resultLength = wcslen(result);
{ url.replace(start, end - start + 1, result, resultLength);
url.replace(start, end - start + 1, result); start += resultLength;
start += result.length();
}
else
{
start = end;
}
} }
measure->url = url; measure->url = url;