mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
garray: Fix NULL-termination of GPtrArray copies
The code was accidentally NULL-terminating the source array rather than
the copy.
This fixes commit ee247c0a2d
.
Spotted by the `array-test` installed test in
https://gitlab.gnome.org/GNOME/glib/-/jobs/2047993.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
parent
2b437402e8
commit
c11e64e7ae
@ -1285,7 +1285,7 @@ g_ptr_array_copy (GPtrArray *array,
|
||||
new_array->len = array->len;
|
||||
}
|
||||
|
||||
ptr_array_null_terminate (rarray);
|
||||
ptr_array_null_terminate ((GRealPtrArray *) new_array);
|
||||
}
|
||||
|
||||
return new_array;
|
||||
|
Loading…
Reference in New Issue
Block a user