From ee8b1dfbc38a9755b5071501f2582a1cb1184e61 Mon Sep 17 00:00:00 2001 From: Rubidium Date: Sat, 29 Apr 2023 13:43:09 +0200 Subject: [PATCH] Fix 4dd5f994: hotkey parsing was broken --- src/hotkeys.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hotkeys.cpp b/src/hotkeys.cpp index 73c7f52bd5..0f76aca4de 100644 --- a/src/hotkeys.cpp +++ b/src/hotkeys.cpp @@ -99,7 +99,7 @@ static uint16 ParseCode(const char *start, const char *end) assert(start <= end); while (start < end && *start == ' ') start++; while (end > start && *end == ' ') end--; - std::string_view str{start, (size_t)(start - end)}; + std::string_view str{start, (size_t)(end - start)}; for (uint i = 0; i < lengthof(_keycode_to_name); i++) { if (StrEqualsIgnoreCase(str, _keycode_to_name[i].name)) { return _keycode_to_name[i].keycode;