Skip to content

Commit 55bb0e5

Browse files
committed
Ignore glitched keybindings when deserialising
1 parent 8c38d9d commit 55bb0e5

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

HCMInternal/HotkeyManager.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,9 +216,15 @@ void HotkeyManagerImpl::deserialiseHotkey(std::shared_ptr<RebindableHotkey> hotk
216216
if (newBindings.empty())
217217
{
218218
PLOG_VERBOSE << "empty newBindings";
219-
//hotkey->setBindings(hotkey->getBindings());
220219
return;
221220
}
221+
222+
if (newBindings.size() > 20)
223+
{
224+
PLOG_ERROR << "newBindings size was over 20 - probably from glitched command console hotkey bug";
225+
return;
226+
}
227+
222228
hotkey->setBindings(newBindings);
223229

224230
PLOG_VERBOSE << "hotkey loaded with " << newBindings.size() << " binding sets";

0 commit comments

Comments
 (0)