comparison nuklear_ui/blastem_nuklear.c @ 2307:a8080240cb92

Fix silly bug I introduced when trying to fix the problem from the SDL2 upgrade
author Michael Pavone <pavone@retrodev.com>
date Thu, 23 Mar 2023 22:38:51 -0700
parents 62f316b76e9a
children b7768c58f0da
comparison
equal deleted inserted replaced
2306:62f316b76e9a 2307:a8080240cb92
927 char *button_key = malloc(button_key_size); 927 char *button_key = malloc(button_key_size);
928 memcpy(button_key, pad_key, pad_key_size); 928 memcpy(button_key, pad_key, pad_key_size);
929 memcpy(button_key + pad_key_size, button_base, sizeof(button_base)); 929 memcpy(button_key + pad_key_size, button_base, sizeof(button_base));
930 930
931 char *final_key; 931 char *final_key;
932 for (int i = 0; i <= SDL_CONTROLLER_BUTTON_MAX; i++) 932 for (int i = 0; i < SDL_CONTROLLER_BUTTON_MAX; i++)
933 { 933 {
934 char *base; 934 char *base;
935 const char *suffix; 935 const char *suffix;
936 size_t base_key_len; 936 size_t base_key_len;
937 if ( i < SDL_CONTROLLER_BUTTON_DPAD_UP || i > SDL_CONTROLLER_BUTTON_DPAD_RIGHT) { 937 if ( i < SDL_CONTROLLER_BUTTON_DPAD_UP || i > SDL_CONTROLLER_BUTTON_DPAD_RIGHT) {