summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/apk_defines.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/apk_defines.h b/src/apk_defines.h
index dbb21bf..086dc96 100644
--- a/src/apk_defines.h
+++ b/src/apk_defines.h
@@ -162,7 +162,7 @@ static inline uint32_t get_unaligned32(const void *ptr)
return *(const uint32_t *)ptr;
#else
const uint8_t *p = ptr;
- return p[0] | p[1] << 8 | p[2] << 16 | p[3] << 24;
+ return p[0] | (uint32_t)p[1] << 8 | (uint32_t)p[2] << 16 | (uint32_t)p[3] << 24;
#endif
}