Skip to content

Commit b31c5d8

Browse files
committed
fix: tf_read_uint24 should use BITOR, not BITAND
1 parent b8ae3c0 commit b31c5d8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 3.21)
22

33
project(tinyfseq
4-
VERSION 1.0.0
4+
VERSION 1.0.1
55
DESCRIPTION "A tiny library for decoding FSEQ (.fseq) v2.0+ sequence files"
66
HOMEPAGE_URL "https://github.com/Cryptkeeper/libtinyfseq"
77
LANGUAGES C)

tinyfseq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ enum tf_err_t tf_read_var_header(const uint8_t *bd, int bs, struct tf_var_header
116116

117117
static uint32_t tf_read_uint24(const uint8_t *bd) {
118118
// WARNING: this assumes little endian byte order
119-
return (uint32_t) (bd[0] & (bd[1] << 8) & (bd[2] << 16));
119+
return (uint32_t) (bd[0] | (bd[1] << 8) | (bd[2] << 16));
120120
}
121121

122122
enum tf_err_t tf_read_channel_range(const uint8_t *bd, int bs, struct tf_channel_range_t *channelRange, uint8_t **ep) {

0 commit comments

Comments
 (0)