Author: hbelusca
Date: Wed Jan 18 12:59:35 2017
New Revision: 73580
URL:
http://svn.reactos.org/svn/reactos?rev=73580&view=rev
Log:
Fix a bug introduced in r73579.
CORE-12684
Modified:
trunk/reactos/dll/win32/shell32/CNewMenu.cpp
Modified: trunk/reactos/dll/win32/shell32/CNewMenu.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/CNewMenu…
==============================================================================
--- trunk/reactos/dll/win32/shell32/CNewMenu.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/CNewMenu.cpp [iso-8859-1] Wed Jan 18 12:59:35 2017
@@ -532,7 +532,7 @@
LoadStringW(shell32_hInstance, FCIDM_SHVIEW_NEW, wszBuf, _countof(wszBuf));
// FIXME: PathCchAddBackslashExW(wszPath, _countof(wszPath),
&pwszFilename, &cchFilenameMax);
pwszFilename = PathAddBackslashW(wszPath);
- cchFilenameMax = wcslen(wszPath) + 1;
+ cchFilenameMax = _countof(wszBuf) - wcslen(wszPath);
StringCchPrintfW(pwszFilename, cchFilenameMax, L"%s %s%s", wszBuf,
pItem->pwszDesc, pItem->pwszExt);
/* Find unique name */