Skip to contentSkip to conversation

kvm tools: sdl -- Fix array size for keymap

PATCH New Cyrill Gorcunov 1 participant 1 message Dec 18, 2011 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kvm tools: sdl -- Fix array size for keymap

Index is u8 value so array size should be 256.

---
 tools/kvm/ui/sdl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/kvm/ui/sdl.c +1 -1
Index: linux-2.6.git/tools/kvm/ui/sdl.c
===================================================================
@@ -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 */