mirror of
https://github.com/libretro/RetroArch
synced 2025-03-31 19:21:06 +00:00
Merge pull request #11736 from SimpleTease/netplay_2
netplay: allocate crashfix
This commit is contained in:
commit
84d75783ea
@ -158,7 +158,10 @@ netplay_input_state_t netplay_input_state_for(
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
/* Couldn't find a slot, allocate a fresh one */
|
/* Couldn't find a slot, allocate a fresh one */
|
||||||
ret = (netplay_input_state_t)calloc(1, sizeof(struct netplay_input_state) + (size-1) * sizeof(uint32_t));
|
if (size > 1)
|
||||||
|
ret = (netplay_input_state_t)calloc(1, sizeof(struct netplay_input_state) + (size-1) * sizeof(uint32_t));
|
||||||
|
else
|
||||||
|
ret = (netplay_input_state_t)calloc(1, sizeof(struct netplay_input_state));
|
||||||
if (!ret)
|
if (!ret)
|
||||||
return NULL;
|
return NULL;
|
||||||
*list = ret;
|
*list = ret;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user