Commit 16230927 authored by Sam Lantinga's avatar Sam Lantinga

Fixed array overrun

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402719
parent 0f15089e
......@@ -37,7 +37,7 @@ struct SDL_Keyboard
/* Data common to all keyboards */
SDL_WindowID focus;
Uint16 modstate;
Uint8 keystate[(SDL_NUM_SCANCODES + 7) / 8];
Uint8 keystate[SDL_NUM_SCANCODES];
SDLKey keymap[SDL_NUM_SCANCODES];
void *driverdata;
......
......@@ -63,8 +63,10 @@ PrintKey(SDL_keysym * sym, int pressed)
SDL_GetScancodeName(sym->scancode),
sym->sym, SDL_GetKeyName(sym->sym));
} else {
printf("Unknown Key (scancode = 0x%04X) %s ",
sym->scancode, pressed ? "pressed" : "released");
printf("Unknown Key (scancode = 0x%04X = %s) %s ",
sym->scancode,
SDL_GetScancodeName(sym->scancode),
pressed ? "pressed" : "released");
}
/* Print the translated character, if one exists */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment