Skip to content

fix: return unchanged for invalid shuffle ranges - #308

Open
umrndem wants to merge 1 commit into
d3:mainfrom
umrndem:fix/shuffle-invalid-ranges-302
Open

umrndem wants to merge 1 commit into
d3:mainfrom
umrndem:fix/shuffle-invalid-ranges-302

Conversation

@umrndem

@umrndem umrndem commented Dec 3, 2026

Copy link
Copy Markdown

Closes #302.

returns the input unchanged for invalid shuffle bounds, so reversed or fractional ranges cannot enter an endless loop or write outside the array. valid bounds keep the existing numeric coercion and seeded results.

added regressions that fail on the current code without hanging the test runner. all 541 tests pass, with one existing skip, and lint passes. this follows up the closed #304 using a no-op for invalid ranges rather than rounding or clamping them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

shuffle hangs forever when start is greater than stop

1 participant