From ff04d39badee14c95467604593fbc5bf32021d3d Mon Sep 17 00:00:00 2001 From: spx Date: Wed, 4 Aug 2010 08:10:54 +0000 Subject: [PATCH] Fixed the crash issue that the commandline option length is less than 4 characters. --- Library/Rainmeter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Rainmeter.cpp b/Library/Rainmeter.cpp index 14043b2f..2c77eb4d 100644 --- a/Library/Rainmeter.cpp +++ b/Library/Rainmeter.cpp @@ -1247,7 +1247,7 @@ int CRainmeter::Initialize(HWND Parent, HINSTANCE Instance, LPCSTR szPath) { iniFile += L"Rainmeter.ini"; } - else if (iniFile.substr(iniFile.length() - 4) != L".ini") + else if (iniFile.length() <= 4 || iniFile.substr(iniFile.length() - 4) != L".ini") { iniFile += L"\\Rainmeter.ini"; }