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;
|
int i;
|
||||||
SDL_KeyboardID *keyboards;
|
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 (keyboards) {
|
||||||
if (count) {
|
if (count) {
|
||||||
*count = SDL_keyboard_count;
|
*count = SDL_keyboard_count;
|
||||||
|
|||||||
@@ -422,7 +422,7 @@ SDL_MouseID *SDL_GetMice(int *count)
|
|||||||
int i;
|
int i;
|
||||||
SDL_MouseID *mice;
|
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 (mice) {
|
||||||
if (count) {
|
if (count) {
|
||||||
*count = SDL_mouse_count;
|
*count = SDL_mouse_count;
|
||||||
|
|||||||
Reference in New Issue
Block a user