From 26dad277c9e95622cf280bca0eba819d2ea1cd85 Mon Sep 17 00:00:00 2001 From: QoL Date: Sat, 20 Feb 2021 01:21:28 +0200 Subject: [PATCH] Fix shortcut name more than 64 characters makes an empty name issue Fix #9556, close #9543 --- PowerEditor/src/WinControls/shortcut/shortcut.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PowerEditor/src/WinControls/shortcut/shortcut.cpp b/PowerEditor/src/WinControls/shortcut/shortcut.cpp index 2e646f93b..872cd1f79 100644 --- a/PowerEditor/src/WinControls/shortcut/shortcut.cpp +++ b/PowerEditor/src/WinControls/shortcut/shortcut.cpp @@ -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] != '&') {