--- a/src/EOT.c
+++ b/src/EOT.c
@@ -12,7 +12,7 @@
 
 uint32_t EOTreadU32LE(const uint8_t *bytes)
 {
-  return bytes[0] | (bytes[1] << 8) | (bytes[2] << 16) | (bytes[3] << 24);
+  return ((uint32_t)bytes[0]) | (((uint32_t)bytes[1]) << 8) | (((uint32_t)bytes[2]) << 16) | (((uint32_t)bytes[3]) << 24);
 }
 
 uint16_t EOTreadU16LE(const uint8_t *bytes)
