1
0
mirror of https://gitlab.gnome.org/GNOME/glib.git synced 2025-07-23 02:17:51 +02:00

Merge branch 'wip/smcv/gptrarray-null-term' into 'main'

garray: Update NULL termination after copying array content

Closes 

See merge request 
This commit is contained in:
Simon McVittie
2023-01-10 19:51:57 +00:00

@@ -1387,6 +1387,9 @@ ptr_array_new_from_array (gpointer *data,
memcpy (rarray->pdata, data, len * sizeof (gpointer));
}
if (null_terminated && rarray->pdata != NULL)
rarray->pdata[len] = NULL;
rarray->len = len;
return array;