mirror of
				https://github.com/chibicitiberiu/rainmeter-studio.git
				synced 2024-02-24 04:33:31 +00:00 
			
		
		
		
	Fixed that Rainmeter crashes when [] is in bang. E.g. !SetVariable test "blaa[]"
This commit is contained in:
		@@ -3167,18 +3167,11 @@ std::wstring CRainmeter::ParseCommand(const WCHAR* command, CMeterWindow* meterW
 | 
				
			|||||||
		start = strCommand.find(L'[', start);
 | 
							start = strCommand.find(L'[', start);
 | 
				
			||||||
		if (start != std::wstring::npos)
 | 
							if (start != std::wstring::npos)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			end = strCommand.find(L']', start);
 | 
								end = strCommand.find(L']', start + 1);
 | 
				
			||||||
			if (end != std::wstring::npos)
 | 
								if (end != std::wstring::npos)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				std::wstring measureName = strCommand.substr(start + 1, end - (start + 1));
 | 
									std::wstring measureName = strCommand.substr(start + 1, end - (start + 1));
 | 
				
			||||||
				if (!measureName.empty())
 | 
									if (!measureName.empty() && measureName[0] != L'!')	// Ignore bangs
 | 
				
			||||||
				{
 | 
					 | 
				
			||||||
					// Ignore bangs
 | 
					 | 
				
			||||||
					if (measureName[0] == L'!')
 | 
					 | 
				
			||||||
					{
 | 
					 | 
				
			||||||
						start = end + 1;
 | 
					 | 
				
			||||||
					}
 | 
					 | 
				
			||||||
					else
 | 
					 | 
				
			||||||
				{
 | 
									{
 | 
				
			||||||
					if (meterWindow)
 | 
										if (meterWindow)
 | 
				
			||||||
					{
 | 
										{
 | 
				
			||||||
@@ -3210,6 +3203,9 @@ std::wstring CRainmeter::ParseCommand(const WCHAR* command, CMeterWindow* meterW
 | 
				
			|||||||
						}
 | 
											}
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
 | 
									else
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										start = end + 1;
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user