From 88a004ef4f33eec3b208912bcc85f493f35265ab Mon Sep 17 00:00:00 2001 From: Claudio Matsuoka Date: Tue, 10 Nov 2020 19:39:29 -0300 Subject: [PATCH] Remove sequence change workaround for old libxmp A workaround for sequence changes when using libxmp 4.0.4 or older was causing memory access violations. Since we currently require libxmp 4.4, we can safely drop this workaround. Fixes #21 Signed-off-by: Claudio Matsuoka --- src/commands.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/commands.c b/src/commands.c index 9958e74..4e7d66c 100644 --- a/src/commands.c +++ b/src/commands.c @@ -103,18 +103,10 @@ static void change_sequence(xmp_context handle, struct xmp_module_info *mi, stru seq += i; - /* This should never happen with libxmp 4.0.5 or newer */ - while (mi->seq_data[seq].duration <= 0) - seq += i; - if (seq >= mi->num_sequences) { seq = 0; } else if (seq < 0) { seq = mi->num_sequences - 1; - - /* This should never happen with libxmp 4.0.5 or newer */ - while (mi->seq_data[seq].duration <= 0) - seq--; } if (seq == ctl->sequence) {