From 8613e60946390979445052ad62a26bc4b09b9b81 Mon Sep 17 00:00:00 2001 From: bnnm Date: Sun, 23 Jun 2019 22:25:28 +0200 Subject: [PATCH] Fix TXTH (offset)$1 command in some cases --- src/meta/txth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/meta/txth.c b/src/meta/txth.c index 24bb927b..be77bd0a 100644 --- a/src/meta/txth.c +++ b/src/meta/txth.c @@ -1290,7 +1290,7 @@ static int parse_num(STREAMFILE * streamFile, txth_header * txth, const char * v offset = offset + subsong_offset * (txth->target_subsong - 1); switch(size) { - case 1: value = read_8bit(offset,streamFile); break; + case 1: value = (uint8_t)read_8bit(offset,streamFile); break; case 2: value = big_endian ? (uint16_t)read_16bitBE(offset,streamFile) : (uint16_t)read_16bitLE(offset,streamFile); break; case 3: value = (big_endian ? (uint32_t)read_32bitBE(offset,streamFile) : (uint32_t)read_32bitLE(offset,streamFile)) & 0x00FFFFFF; break; case 4: value = big_endian ? (uint32_t)read_32bitBE(offset,streamFile) : (uint32_t)read_32bitLE(offset,streamFile); break;