gptrarray: Correctly set copied array length in g_ptr_array_copy()

The allocation size was set correctly before, but not the array length,
so the copied array appeared to have zero elements.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
Philip Withnall 2019-07-16 10:15:57 +01:00
parent 1ac8d50331
commit b4943aa360

View File

@ -1051,6 +1051,8 @@ g_ptr_array_copy (GPtrArray *array,
array->len * sizeof (*array->pdata));
}
new_array->len = array->len;
return new_array;
}