From 6394b447bada76b500b8d8de456c6429b892a467 Mon Sep 17 00:00:00 2001 From: Birunthan Mohanathas Date: Tue, 13 Nov 2012 17:55:57 +0200 Subject: [PATCH] Tweaks --- Library/DialogManage.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Library/DialogManage.cpp b/Library/DialogManage.cpp index 40c6be79..4fb1384d 100644 --- a/Library/DialogManage.cpp +++ b/Library/DialogManage.cpp @@ -1799,9 +1799,11 @@ INT_PTR CDialogManage::CTabSettings::OnCommand(WPARAM wParam, LPARAM lParam) case IDC_MANAGESETTINGS_SKINPATH_TEXT: if (HIWORD(wParam) == EN_CHANGE) { - WCHAR buffer[MAX_LINE_LENGTH]; - std::wstring skinPath = (GetWindowText((HWND)lParam, buffer, MAX_LINE_LENGTH) > 0) ? buffer : Rainmeter->GetSkinPath(); - Rainmeter->SetSkinPath(skinPath); + WCHAR buffer[MAX_PATH]; + if (GetWindowText((HWND)lParam, buffer, _countof(buffer)) > 0) + { + Rainmeter->SetSkinPath(buffer); + } } break;