mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-14 16:26:17 +01:00
Merge branch 'wip/smcv/gptrarray-null-term' into 'main'
garray: Update NULL termination after copying array content Closes #2877 See merge request GNOME/glib!3190
This commit is contained in:
commit
1955497993
@ -1387,6 +1387,9 @@ ptr_array_new_from_array (gpointer *data,
|
|||||||
memcpy (rarray->pdata, data, len * sizeof (gpointer));
|
memcpy (rarray->pdata, data, len * sizeof (gpointer));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (null_terminated && rarray->pdata != NULL)
|
||||||
|
rarray->pdata[len] = NULL;
|
||||||
|
|
||||||
rarray->len = len;
|
rarray->len = len;
|
||||||
|
|
||||||
return array;
|
return array;
|
||||||
|
Loading…
Reference in New Issue
Block a user