mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-07 15:10:49 +00:00
Fix incorrect type in SDL_GetMice() and SDL_GetKeyboards() allocation (#14870)
This commit is contained in:
parent
f3a3c803ca
commit
124c5922aa
2 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue