mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-02-13 15:23:34 +00:00
Fix incorrect type in SDL_GetMice() and SDL_GetKeyboards() allocation (#14870)
This commit is contained in:
@@ -179,7 +179,7 @@ SDL_KeyboardID *SDL_GetKeyboards(int *count)
|
||||
int i;
|
||||
SDL_KeyboardID *keyboards;
|
||||
|
||||
keyboards = (SDL_JoystickID *)SDL_malloc((SDL_keyboard_count + 1) * sizeof(*keyboards));
|
||||
keyboards = (SDL_KeyboardID *)SDL_malloc((SDL_keyboard_count + 1) * sizeof(*keyboards));
|
||||
if (keyboards) {
|
||||
if (count) {
|
||||
*count = SDL_keyboard_count;
|
||||
|
||||
@@ -422,7 +422,7 @@ SDL_MouseID *SDL_GetMice(int *count)
|
||||
int i;
|
||||
SDL_MouseID *mice;
|
||||
|
||||
mice = (SDL_JoystickID *)SDL_malloc((SDL_mouse_count + 1) * sizeof(*mice));
|
||||
mice = (SDL_MouseID *)SDL_malloc((SDL_mouse_count + 1) * sizeof(*mice));
|
||||
if (mice) {
|
||||
if (count) {
|
||||
*count = SDL_mouse_count;
|
||||
|
||||
Reference in New Issue
Block a user