Skip to content

Fix zlistx_sort edge case#2329

Merged
sphaero merged 1 commit intozeromq:masterfrom
Nistenf:comb-sort-fix
Apr 15, 2026
Merged

Fix zlistx_sort edge case#2329
sphaero merged 1 commit intozeromq:masterfrom
Nistenf:comb-sort-fix

Conversation

@Nistenf
Copy link
Copy Markdown
Contributor

@Nistenf Nistenf commented Apr 13, 2026

The zlistx_sort comb sort implementation was missing the minimum gap value check. This causes any array which needs more than one gap==1 passes to be sorted to end up using a gap value of 0, comparing each item to itself and returning early without finishing the sort.
This PR adds the missing check and a (previously failing) test case.

@sphaero
Copy link
Copy Markdown
Contributor

sphaero commented Apr 15, 2026

Thanks!

@sphaero sphaero merged commit 26ea18c into zeromq:master Apr 15, 2026
8 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants