diff --git a/Library/Rainmeter.cpp b/Library/Rainmeter.cpp index 991d7b2b..b87d2f6d 100644 --- a/Library/Rainmeter.cpp +++ b/Library/Rainmeter.cpp @@ -2066,11 +2066,11 @@ void CRainmeter::ExecuteCommand(const WCHAR* command, CMeterWindow* meterWindow) } } - if (command[0] == L'[' && command[1] == L'!') // Multi-bang + if (command[0] == L'[') // Multi-bang { - std::wstring bangs = command; - std::wstring::size_type start = std::wstring::npos; - int count = 0; + std::wstring bangs = &command[1]; + std::wstring::size_type start = 0; + int count = 1; for (size_t i = 0, isize = bangs.size(); i < isize; ++i) { if (bangs[i] == L'[')