* While I am unsure if this would've ever happened, this will prevent the locations from being out-of-bounds.
| ... | ... |
@@ -744,9 +744,9 @@ void Channel::IncrementSample() |
| 744 | 744 |
|
| 745 | 745 |
if (this->reg.repeatMode == 1) |
| 746 | 746 |
{
|
| 747 |
- if (loc >= this->reg.totalLength) |
|
| 747 |
+ while (loc >= this->reg.totalLength) |
|
| 748 | 748 |
loc -= this->reg.length; |
| 749 |
- if (newloc >= this->reg.totalLength) |
|
| 749 |
+ while (newloc >= this->reg.totalLength) |
|
| 750 | 750 |
newloc -= this->reg.length; |
| 751 | 751 |
} |
| 752 | 752 |
|