From d800452e6df1a59649a3a30036102a1203c4f135 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Thu, 27 Jun 2024 02:52:46 -0500 Subject: [PATCH] IT import: fix 16-bit compressed sample crash --- src/engine/fileOps/it.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/engine/fileOps/it.cpp b/src/engine/fileOps/it.cpp index 5536db20f..bec1e9c30 100644 --- a/src/engine/fileOps/it.cpp +++ b/src/engine/fileOps/it.cpp @@ -212,7 +212,7 @@ bool DivEngine::loadIT(unsigned char* file, size_t len) { ds.noSlidesOnFirstTick=true; ds.rowResetsArpPos=true; ds.ignoreJumpAtEnd=false; - ds.pitchSlideSpeed=4; + ds.pitchSlideSpeed=8; logV("Impulse Tracker module"); @@ -627,9 +627,9 @@ bool DivEngine::loadIT(unsigned char* file, size_t len) { unsigned int ret=0; logV("decompression begin..."); if (s->depth==DIV_SAMPLE_DEPTH_16BIT) { - ret=it_decompress16(s->data16,s->length16,&file[reader.tell()],len-reader.tell(),(convert&4)?1:0,(flags&4)?2:1); + ret=it_decompress16(s->data16,s->samples,&file[reader.tell()],len-reader.tell(),(convert&4)?1:0,(flags&4)?2:1); } else { - ret=it_decompress8(s->data8,s->length8,&file[reader.tell()],len-reader.tell(),(convert&4)?1:0,(flags&4)?2:1); + ret=it_decompress8(s->data8,s->samples,&file[reader.tell()],len-reader.tell(),(convert&4)?1:0,(flags&4)?2:1); } logV("got: %d",ret); } else {