From 50cd73fc4cba8b575a0e921a3cfbc6433b095e73 Mon Sep 17 00:00:00 2001 From: KOLANICH Date: Wed, 10 Nov 2021 12:21:43 +0300 Subject: [PATCH] Fixed the location of mode table. It feeled weird we have to compute it from `xwia` location, which may be not present at all (but we used it anyway). Tracing has shown that the offset computed using the formula matches the offset in `wmta` field, so it is likely that that field should be used instead. --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index 6e42175..22478df 100644 --- a/main.c +++ b/main.c @@ -1101,7 +1101,7 @@ int main(int argc, char **argv) { // first byte of xwia contains the length // last byte after xwia is a checksum - modes = data + header->xwia + 1 + xwia_len + 1; + modes = data + header->wmta; if(parse_modes(header, data, modes, header->mc + 1, header->trc + 1, wav_addrs, 1, NULL, 0) < 0) { fprintf(stderr, "Parse error during first pass\n");