mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Fixed infinite loop with RegExpSubstitute when Substitute has a empty string.
http://rainmeter.net/forum/viewtopic.php?f=14&t=13377 http://rainmeter.net/forum/viewtopic.php?f=14&t=10954
This commit is contained in:
parent
0f97ddf497
commit
42061a7b66
@ -246,6 +246,11 @@ const WCHAR* CMeasure::CheckSubstitute(const WCHAR* buffer)
|
||||
int flags = PCRE_UTF8;
|
||||
int offset = 0;
|
||||
|
||||
if (m_Substitute[i] == L"")
|
||||
{
|
||||
m_Substitute[i] = L"^$";
|
||||
}
|
||||
|
||||
re = pcre_compile(
|
||||
ConvertToUTF8(m_Substitute[i].c_str()).c_str(), // the pattern
|
||||
flags, // default options
|
||||
|
Loading…
Reference in New Issue
Block a user