mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-09-22 01:18:12 +02:00
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);
|
lstrcpyn(_menuName, menuName, nameLenMax);
|
||||||
TCHAR const * name = shortcutName ? shortcutName : menuName;
|
TCHAR const * name = shortcutName ? shortcutName : menuName;
|
||||||
int i = 0, j = 0;
|
int i = 0, j = 0;
|
||||||
while (name[j] != 0 && i < nameLenMax)
|
while (name[j] != 0 && i < (nameLenMax-1))
|
||||||
{
|
{
|
||||||
if (name[j] != '&')
|
if (name[j] != '&')
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user