diff --git a/navy-apps/libs/libminiSDL/src/event.c b/navy-apps/libs/libminiSDL/src/event.c index 17762cc..f6e9b57 100644 --- a/navy-apps/libs/libminiSDL/src/event.c +++ b/navy-apps/libs/libminiSDL/src/event.c @@ -27,8 +27,8 @@ int SDL_WaitEvent(SDL_Event *event) { } else if (buf[1] == 'u') { event->type = SDL_KEYUP; } - for (int i = 0; i < sizeof(keyname) / sizeof(keyname[0]); i ++ ) { - if (strcmp(buf + 3, keyname[i]) == 0) { + for (int i = 0; i < 83; i ++ ) { + if (strncmp(buf + 3, keyname[i], strlen(keyname[i])) == 0) { printf("SDL_WaitEvent Got %s\n", keyname[i]); event->key.keysym.sym = i; return 1;