ref: 16c119ad546665eef86579cefd2a6501c0e3059f
parent: b456e20491ea5edc1c052d21e1c105f2d2d5815b
author: Chris Moeller <kode54@gmail.com>
date: Mon Nov 25 12:05:36 EST 2013
Fixed assertion checks in case of envelope loops on the last node
--- a/dumb/src/it/itrender.c
+++ b/dumb/src/it/itrender.c
@@ -3886,7 +3886,7 @@
if ((envelope->flags & IT_ENVELOPE_SUSTAIN_LOOP) && !(playing->flags & IT_PLAYING_SUSTAINOFF)) {
if (pe->tick > envelope->node_t[envelope->sus_loop_end]) {
pe->next_node = envelope->sus_loop_start + 1;
- ASSERT(pe->next_node < envelope->n_nodes);
+ ASSERT(pe->next_node <= envelope->n_nodes);
pe->tick = envelope->node_t[envelope->sus_loop_start];
return 0;
}
@@ -3893,7 +3893,7 @@
} else if (envelope->flags & IT_ENVELOPE_LOOP_ON) {
if (pe->tick > envelope->node_t[envelope->loop_end]) {
pe->next_node = envelope->loop_start + 1;
- ASSERT(pe->next_node < envelope->n_nodes);
+ ASSERT(pe->next_node <= envelope->n_nodes);
pe->tick = envelope->node_t[envelope->loop_start];
return 0;
}