From f05c6a1f72da7765f1cd9d37b25963e33671bb6c Mon Sep 17 00:00:00 2001 From: Self Not Found Date: Sun, 22 Jan 2023 15:12:33 +0800 Subject: [PATCH] Fix the types of parameters in BitstreamOut_t BitstreamOut_t in client/src/loclass/cipherutils.h is also used in client/src/cmddata.c for decimatioin, but uint8_t is too small for such application --- armsrc/optimized_cipherutils.h | 8 ++++---- client/src/loclass/cipherutils.h | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/armsrc/optimized_cipherutils.h b/armsrc/optimized_cipherutils.h index 73fbfc730..1bef017a2 100644 --- a/armsrc/optimized_cipherutils.h +++ b/armsrc/optimized_cipherutils.h @@ -39,14 +39,14 @@ typedef struct { uint8_t *buffer; - uint8_t numbits; - uint8_t position; + uint32_t numbits; + uint32_t position; } BitstreamIn_t; typedef struct { uint8_t *buffer; - uint8_t numbits; - uint8_t position; + uint32_t numbits; + uint32_t position; } BitstreamOut_t; bool headBit(BitstreamIn_t *stream); diff --git a/client/src/loclass/cipherutils.h b/client/src/loclass/cipherutils.h index aeba9f33d..160945f0d 100644 --- a/client/src/loclass/cipherutils.h +++ b/client/src/loclass/cipherutils.h @@ -42,14 +42,14 @@ typedef struct { uint8_t *buffer; - uint8_t numbits; - uint8_t position; + uint32_t numbits; + uint32_t position; } BitstreamIn_t; typedef struct { uint8_t *buffer; - uint8_t numbits; - uint8_t position; + uint32_t numbits; + uint32_t position; } BitstreamOut_t; bool headBit(BitstreamIn_t *stream);