Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix WT-length-one clamp error #6703

Merged
merged 1 commit into from
Nov 20, 2022

Conversation

baconpaul
Copy link
Collaborator

In recent versions we allowed wavetables of length one but when doing so missed this clamp which resulted in hi < lo. that is UB (but defacto clamped to low) but that inversion triggers an assert on some configurations.

So (1) add a debug assert to our limit range and (2) use a max of 0 on the upper bound.

Closes #6702

In recent versions we allowed wavetables of length one
but when doing so missed this clamp which resulted in
hi < lo. that is UB (but defacto clamped to low) but
that inversion triggers an assert on some configurations.

So (1) add a debug assert to our limit range and (2) use a max of
0 on the upper bound.

Closes surge-synthesizer#6702
@baconpaul baconpaul merged commit fab28b3 into surge-synthesizer:main Nov 20, 2022
mkruselj pushed a commit to mkruselj/surge that referenced this pull request Nov 29, 2022
In recent versions we allowed wavetables of length one
but when doing so missed this clamp which resulted in
hi < lo. that is UB (but defacto clamped to low) but
that inversion triggers an assert on some configurations.

So (1) add a debug assert to our limit range and (2) use a max of
0 on the upper bound.

Closes surge-synthesizer#6702
@baconpaul baconpaul deleted the clamp-wt-1-6702 branch July 8, 2024 12:01
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.

Surge crashes when trying to use the "Blue Whale Organ" patch
1 participant