diff --git a/apps/openmw/mwgui/quickkeysmenu.cpp b/apps/openmw/mwgui/quickkeysmenu.cpp index e2e2e1ab1..ed5328d36 100644 --- a/apps/openmw/mwgui/quickkeysmenu.cpp +++ b/apps/openmw/mwgui/quickkeysmenu.cpp @@ -504,7 +504,8 @@ namespace MWGui ESM::QuickKeys keys; - for (int i=0; i<10; ++i) + // NB: The quick key with index 9 always has Hand-to-Hand type and must not be saved + for (int i=0; i<9; ++i) { ItemWidget* button = mKey[i].button; @@ -553,7 +554,8 @@ namespace MWGui int i=0; for (ESM::QuickKeys::QuickKey& quickKey : keys.mKeys) { - if (i >= 10) + // NB: The quick key with index 9 always has Hand-to-Hand type and must not be loaded + if (i >= 9) return; mSelected = &mKey[i];