From c0901d12f3db65bab1efd0fbb1cc3ca366945614 Mon Sep 17 00:00:00 2001 From: Philipp Klaus Date: Fri, 2 Jun 2017 21:09:52 +0200 Subject: [PATCH] C unpacker extract_info: interpret M-26 frame cntr correctly --- normalmode/c_standalone/extract_info.c | 1 + 1 file changed, 1 insertion(+) diff --git a/normalmode/c_standalone/extract_info.c b/normalmode/c_standalone/extract_info.c index dc1aabe..74cab5a 100644 --- a/normalmode/c_standalone/extract_info.c +++ b/normalmode/c_standalone/extract_info.c @@ -31,6 +31,7 @@ int read_frame(unsigned long *pos, FILE *ptr_file) else header_found = 0; fread(&frame_counter, sizeof(uint32_t), 1, ptr_file); + frame_counter = ((frame_counter & 0xffff)<<16) | ((frame_counter & 0xffff0000)>>16); frame_counter = ntohl(frame_counter); fread(&senlen, sizeof(uint16_t), 1, ptr_file); senlen = ntohs(senlen); -- 2.43.0