forked from AuroraMiddleware/gtk
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:
parent
f77d4d7fc0
commit
e22abd73f2
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user