Changeset 70f7297adda2…
Parent dc3f2148a26a…
by
Changes to one file · Browse files at 70f7297adda2 Showing diff from parent dc3f2148a26a Diff from another changeset...
@@ -414,7 +414,7 @@ *pszName = 0;
char *psz;
- TDEBUG_TRACE("CShellExt::GetCommandString: idCmd = " << idCmd);
+ TDEBUG_TRACE("CShellExt::GetCommandString: idCmd = " << idCmd << ", uFlags = " << uFlags);
MenuIdCmdMap::iterator iter = MenuIdMap.find(static_cast<UINT>(idCmd));
if (iter != MenuIdMap.end())
{
@@ -427,7 +427,14 @@ psz = "";
}
- wcscpy((wchar_t*)pszName, _WCSTR(psz));
+ if (uFlags & GCS_UNICODE)
+ {
+ wcscpy_s((wchar_t*)pszName, cchMax, _WCSTR(psz));
+ }
+ else
+ {
+ strcpy_s((char*)pszName, cchMax, psz);
+ }
return NOERROR;
}
|
Loading...