Commit 610d1d4a authored by cremno's avatar cremno

fix strict aliasing rule violation

parent 6b302d80
...@@ -517,7 +517,7 @@ read_binary_header(const uint8_t *bin, size_t *bin_size, uint16_t *crc, mrb_bool ...@@ -517,7 +517,7 @@ read_binary_header(const uint8_t *bin, size_t *bin_size, uint16_t *crc, mrb_bool
ident<<=8; ident<<=8;
ident|=RITE_BINARY_IDENTIFIER[i]; ident|=RITE_BINARY_IDENTIFIER[i];
} }
if (ident == *(uint32_t*)header->binary_identify) { if (memcmp(header->binary_identify, &ident, sizeof(header->binary_identify)) == 0) {
*byteorder = TRUE; *byteorder = TRUE;
} }
else { else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment