Skip to content

Commit

Permalink
fix: tf_read_uint24 should use BITOR, not BITAND
Browse files Browse the repository at this point in the history
  • Loading branch information
Cryptkeeper committed Apr 12, 2022
1 parent b8ae3c0 commit b31c5d8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.21)

project(tinyfseq
VERSION 1.0.0
VERSION 1.0.1
DESCRIPTION "A tiny library for decoding FSEQ (.fseq) v2.0+ sequence files"
HOMEPAGE_URL "https://github.com/Cryptkeeper/libtinyfseq"
LANGUAGES C)
Expand Down
2 changes: 1 addition & 1 deletion tinyfseq.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ enum tf_err_t tf_read_var_header(const uint8_t *bd, int bs, struct tf_var_header

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

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

0 comments on commit b31c5d8

Please sign in to comment.