Skip to content

Commit 80bdfe5

Browse files
committed
uint16_t is 2 bytes wide - only read 2 bytes from mem
1 parent 9760722 commit 80bdfe5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/isal/isal_zlibmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1643,7 +1643,7 @@ static inline uint32_t load_u32_le(void *address) {
16431643
static inline uint16_t load_u16_le(void *address) {
16441644
#if PY_BIG_ENDIAN
16451645
uint8_t *mem = address;
1646-
return mem[0] | (mem[1] << 8) | (mem[2] << 16) | (mem[3] << 24);
1646+
return mem[0] | (mem[1] << 8);
16471647
#else
16481648
return *(uint16_t *)address;
16491649
#endif

0 commit comments

Comments
 (0)