[GH-ISSUE #41] TapeDust for-loop condition always false #34

Open
opened 2026-05-05 22:02:48 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @NeverKnewTheName on GitHub (Aug 2, 2022).
Original GitHub issue: https://github.com/airwindows/airwindows/issues/41

In TapeDustProc.cpp from the WinVST sources there is a for-loop that's never run due to its condition always evaluating to false:
for(int count = 9; count < 0; count--) { bL[count+1] = bL[count]; bR[count+1] = bR[count]; }
count is set to 9 so it'll always be greater than 0, but the loop queries for count being less than 0 to continue.
i verified this issue by unrolling the loop and testing. turns out there's almost no effect when the loop actually repeats for 10 cycles.

Originally created by @NeverKnewTheName on GitHub (Aug 2, 2022). Original GitHub issue: https://github.com/airwindows/airwindows/issues/41 In TapeDustProc.cpp from the WinVST sources there is a for-loop that's never run due to its condition always evaluating to false: ` for(int count = 9; count < 0; count--) { bL[count+1] = bL[count]; bR[count+1] = bR[count]; } ` count is set to 9 so it'll always be greater than 0, but the loop queries for count being less than 0 to continue. i verified this issue by unrolling the loop and testing. turns out there's almost no effect when the loop actually repeats for 10 cycles.
Author
Owner

@chmaha commented on GitHub (Feb 20, 2023):

I suspect all that needs to happen is change count < 0 to count > 0. It would then follow similar lines in his code. I've created a pull request: https://github.com/airwindows/airwindows/pull/44

<!-- gh-comment-id:1437207969 --> @chmaha commented on GitHub (Feb 20, 2023): I suspect all that needs to happen is change `count < 0` to `count > 0`. It would then follow similar lines in his code. I've created a pull request: https://github.com/airwindows/airwindows/pull/44
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/airwindows#34
No description provided.