garray: Fix NULL-termination of GPtrArray copies

Merged Philip Withnall requested to merge pwithnall/glib:array-copy-null-terminated into main

The code was accidentally NULL-terminating the source array rather than the copy.

This fixes commit ee247c0a.

Spotted by the array-test installed test in https://gitlab.gnome.org/GNOME/glib/-/jobs/2047993.

Signed-off-by: Philip Withnall pwithnall@endlessos.org

Merge request reports