Fix shortcut name more than 64 characters makes an empty name issue
Fix #9556, close #9543
This commit is contained in:
parent
f96d81af11
commit
26dad277c9
|
@ -162,7 +162,7 @@ void Shortcut::setName(const TCHAR * menuName, const TCHAR * shortcutName)
|
|||
lstrcpyn(_menuName, menuName, nameLenMax);
|
||||
TCHAR const * name = shortcutName ? shortcutName : menuName;
|
||||
int i = 0, j = 0;
|
||||
while (name[j] != 0 && i < nameLenMax)
|
||||
while (name[j] != 0 && i < (nameLenMax-1))
|
||||
{
|
||||
if (name[j] != '&')
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue