array: Support clearing an empty array with g_array_remove_range()
Previously, calling g_array_remove_range(array, 0, array->len) on an empty array would result in a precondition failure in g_array_remove_range(), as the given start index (0), was not strictly less than the array length (0). Allow the index to equal the array length, so that zero elements can be removed from any array. A subsequent check makes sure that the array length is not overflowed by the index + length. https://bugzilla.gnome.org/show_bug.cgi?id=763339
parent
7d3d9489
Please register or sign in to comment