From: Katayama Hirofumi MZ Date: Thu, 13 Dec 2018 11:40:05 +0000 (+0900) Subject: [BROWSEUI] Follow up of #1121 X-Git-Tag: 0.4.13-dev~1032 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=fad9f6677a8408ec94684a1061341362a35b7396 [BROWSEUI] Follow up of #1121 CORE-15434 --- diff --git a/dll/win32/shell32/dialogs/dialogs.cpp b/dll/win32/shell32/dialogs/dialogs.cpp index f2fce61fd90..5903fe4b31d 100644 --- a/dll/win32/shell32/dialogs/dialogs.cpp +++ b/dll/win32/shell32/dialogs/dialogs.cpp @@ -578,7 +578,7 @@ static INT_PTR CALLBACK RunDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARA if (wcschr(psz, L'%') != NULL) { - cchExpand = ExpandEnvironmentStringsW(psz, NULL, 0) + 1; + cchExpand = ExpandEnvironmentStringsW(psz, NULL, 0); pszExpanded = (WCHAR*)HeapAlloc(GetProcessHeap(), 0, cchExpand * sizeof(WCHAR)); if (!pszExpanded) {