Skip to content

Commit

Permalink
Berry fix bytes getter for 3-bytes big-endian (#19945)
Browse files Browse the repository at this point in the history
  • Loading branch information
s-hadinger authored Nov 6, 2023
1 parent 4e8e01f commit ceda878
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/libesp32/berry/src/be_byteslib.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ static uint32_t buf_get3_le(buf_impl* attr, size_t offset)
return 0;
}

static uint16_t buf_get3_be(buf_impl* attr, size_t offset)
static uint32_t buf_get3_be(buf_impl* attr, size_t offset)
{
if ((int32_t)offset + 2 < attr->len) {
return attr->bufptr[offset+2] | (attr->bufptr[offset+1] << 8) | (attr->bufptr[offset] << 16);
Expand Down

0 comments on commit ceda878

Please sign in to comment.