diff --git a/src/video/sdl2_v.cpp b/src/video/sdl2_v.cpp index 14af3e3f3f..2f1bc4b9d4 100644 --- a/src/video/sdl2_v.cpp +++ b/src/video/sdl2_v.cpp @@ -524,7 +524,7 @@ struct SDLVkMapping { const bool unprintable; constexpr SDLVkMapping(SDL_Keycode vk_first, SDL_Keycode vk_last, uint8_t map_first, [[maybe_unused]] uint8_t map_last, bool unprintable) - : vk_from(vk_first), vk_count(vk_first - vk_last + 1), map_to(map_first), unprintable(unprintable) + : vk_from(vk_first), vk_count(vk_last - vk_first), map_to(map_first), unprintable(unprintable) { assert((vk_last - vk_first) == (map_last - map_first)); } diff --git a/src/video/sdl_v.cpp b/src/video/sdl_v.cpp index 1b0da21318..52aabda419 100644 --- a/src/video/sdl_v.cpp +++ b/src/video/sdl_v.cpp @@ -383,7 +383,7 @@ struct SDLVkMapping { const uint8_t map_to; constexpr SDLVkMapping(SDL_Keycode vk_first, SDL_Keycode vk_last, uint8_t map_first, [[maybe_unused]] uint8_t map_last) - : vk_from(vk_first), vk_count(vk_first - vk_last + 1), map_to(map_first) + : vk_from(vk_first), vk_count(vk_last - vk_first), map_to(map_first) { assert((vk_last - vk_first) == (map_last - map_first)); }