changeset 1:b0dcd48a1c8a

trau-parse: initial bugfixes
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 24 May 2024 07:25:11 +0000
parents 131e0f1972bb
children b2ef2c80fef1
files trau-parse.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/trau-parse.c	Fri May 24 07:17:23 2024 +0000
+++ b/trau-parse.c	Fri May 24 07:25:11 2024 +0000
@@ -67,7 +67,7 @@
 	printf("Frame at 0x%x:\n", file_offset - 160);
 	printf("  C1-C5: %u%u%u%u%u", frame_bits[17], frame_bits[18],
 		frame_bits[19], frame_bits[20], frame_bits[21]);
-	c1_5 = bits_to_num(frame_bits + 17);
+	c1_5 = bits_to_num(frame_bits + 17, 5);
 	switch (c1_5) {
 	case 0x02:
 		fputs(" (FR UL)", stdout);
@@ -75,7 +75,7 @@
 	case 0x1C:
 		fputs(" (FR DL)", stdout);
 		break;
-	case 0x1E:
+	case 0x1A:
 		fputs(" (EFR)", stdout);
 		break;
 	case 0x10:
@@ -86,7 +86,7 @@
 		break;
 	}
 	putchar('\n');
-	c6_11 = bits_to_num(frame_bits + 22);
+	c6_11 = bits_to_num(frame_bits + 22, 6);
 	printf("  C6-C11: %u\n", c6_11);
 	printf("  C12=%u C13=%u C14=%u C15=%u\n", frame_bits[28],
 		frame_bits[29], frame_bits[30], frame_bits[31]);