mirror of
https://github.com/mpv-player/mpv
synced 2025-02-18 05:37:04 +00:00
subprocess-win: remove VLA usage
This only ever waits on four handles at most anyway.
This commit is contained in:
parent
f2809e19f0
commit
7097b6f81c
@ -173,8 +173,10 @@ error:
|
|||||||
static int sparse_wait(HANDLE *handles, unsigned num_handles)
|
static int sparse_wait(HANDLE *handles, unsigned num_handles)
|
||||||
{
|
{
|
||||||
unsigned w_num_handles = 0;
|
unsigned w_num_handles = 0;
|
||||||
HANDLE w_handles[num_handles];
|
HANDLE w_handles[10];
|
||||||
int map[num_handles];
|
int map[10];
|
||||||
|
if (num_handles > MP_ARRAY_SIZE(w_handles))
|
||||||
|
return -1;
|
||||||
|
|
||||||
for (unsigned i = 0; i < num_handles; i++) {
|
for (unsigned i = 0; i < num_handles; i++) {
|
||||||
if (!handles[i])
|
if (!handles[i])
|
||||||
|
Loading…
Reference in New Issue
Block a user