mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 15:36:14 +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));
|
||||
}
|
||||
|
||||
if (null_terminated && rarray->pdata != NULL)
|
||||
rarray->pdata[len] = NULL;
|
||||
|
||||
rarray->len = len;
|
||||
|
||||
return array;
|
||||
|
Loading…
Reference in New Issue
Block a user