From 26e7e5bb825e91d8a6c3dfcfcb2e9cc4da3923ba Mon Sep 17 00:00:00 2001 From: tildearrow Date: Sun, 14 Jul 2024 03:44:29 -0500 Subject: [PATCH] XM import: fix EC0/ED0 --- src/engine/fileOps/xm.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/fileOps/xm.cpp b/src/engine/fileOps/xm.cpp index 14c624ff5..6f666c1d8 100644 --- a/src/engine/fileOps/xm.cpp +++ b/src/engine/fileOps/xm.cpp @@ -1063,11 +1063,11 @@ bool DivEngine::loadXM(unsigned char* file, size_t len) { break; case 0xc: p->data[j][effectCol[k]++]=0xec; - p->data[j][effectCol[k]++]=effectVal&15; + p->data[j][effectCol[k]++]=MAX(1,effectVal&15); break; case 0xd: p->data[j][effectCol[k]++]=0xed; - p->data[j][effectCol[k]++]=effectVal&15; + p->data[j][effectCol[k]++]=MAX(1,effectVal&15); break; } break;