timsort: Actually 0-terminate the array in get_runs()

This could cause SEGVs when changing the sort during an ongoing sort
operation.
This commit is contained in:
Benjamin Otte 2020-07-22 18:59:22 +02:00
parent f77d4d7fc0
commit e22abd73f2

View File

@ -206,6 +206,8 @@ gtk_tim_sort_get_runs (GtkTimSort *self,
for (i = 0; i < self->pending_runs; i++)
runs[i] = self->run[i].len;
runs[self->pending_runs] = 0;
}
/*<private>