Skip to content

Conversation

@jmh530
Copy link
Contributor

@jmh530 jmh530 commented Jan 20, 2021

Issue 328 results from when calling median with a slice of 18 elements. It does not happen with smaller slices because of the branching logic in partitionAtImpl. The fix is that the length command is used in the original from Phobos, but the iterators are used here and the last iterator is calculated with one minus the length. Adjusting the iterator up by 1 fixes the issue.

@jmh530
Copy link
Contributor Author

jmh530 commented Jan 20, 2021

I'm waiting for CI now, but when I test it locally I get an assert error that does not seem to be related to anything here. Versioning the unittests just for the changes here results in no error.

@9il 9il merged commit bcaf717 into libmir:master Jan 21, 2021
@jmh530 jmh530 deleted the fix-partitionAt branch May 12, 2021 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants