comparison test/checkkeys.c @ 2307:47f8a579cd9b

Fixed array overrun
author Sam Lantinga <slouken@libsdl.org>
date Thu, 07 Feb 2008 16:14:43 +0000
parents fbe8ff44c519
children 95586dfe1992
comparison
equal deleted inserted replaced
2306:1a8bab15a45d 2307:47f8a579cd9b
61 pressed ? "pressed " : "released", 61 pressed ? "pressed " : "released",
62 sym->scancode, 62 sym->scancode,
63 SDL_GetScancodeName(sym->scancode), 63 SDL_GetScancodeName(sym->scancode),
64 sym->sym, SDL_GetKeyName(sym->sym)); 64 sym->sym, SDL_GetKeyName(sym->sym));
65 } else { 65 } else {
66 printf("Unknown Key (scancode = 0x%04X) %s ", 66 printf("Unknown Key (scancode = 0x%04X = %s) %s ",
67 sym->scancode, pressed ? "pressed" : "released"); 67 sym->scancode,
68 SDL_GetScancodeName(sym->scancode),
69 pressed ? "pressed" : "released");
68 } 70 }
69 71
70 /* Print the translated character, if one exists */ 72 /* Print the translated character, if one exists */
71 if (sym->unicode) { 73 if (sym->unicode) {
72 /* Is it a control-character? */ 74 /* Is it a control-character? */