Fixed usage of 8-bit modulo operator off-by-one maximum. (#901)

This commit is contained in:
Steve Karg
2025-02-04 13:56:53 -06:00
committed by GitHub
parent 19ef7f74cd
commit 77bdaaf853
5 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ static void test_COBS_Encode_Decode(void)
size_t encoded_buffer_length, test_buffer_length;
for (i = 2; i < sizeof(buffer); i++) {
buffer[i] = i % 0xff;
buffer[i] = i % 256;
}
encoded_buffer_length = cobs_frame_encode(
encoded_buffer, sizeof(encoded_buffer), buffer, sizeof(buffer));