kvm tools: sdl -- Fix array size for keymap
PATCH 1/1 kvm tools: sdl -- Fix array size for keymap
Index is u8 value so array size should be 256.
Signed-off-by Cyrill Gorcunov <[email protected]>
--- tools/kvm/ui/sdl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/kvm/ui/sdl.c +1 -1
@@ -34,7 +34,7 @@ struct set2_scancode { .type = SCANCODE_ESCAPED,\ } -static const struct set2_scancode const keymap[255 ] = { +static const struct set2_scancode const keymap[256 ] = { [9 ] =DEFINE_SC (0x76 ),/* <esc> */ [10 ] =DEFINE_SC (0x16 ),/* 1 */ [11 ] =DEFINE_SC (0x1e ),/* 2 */