fix strict aliasing rule violation

This commit is contained in:
cremno
2014-09-04 12:34:37 +02:00
parent 6b302d80a3
commit 610d1d4afa
+1 -1
View File
@@ -517,7 +517,7 @@ read_binary_header(const uint8_t *bin, size_t *bin_size, uint16_t *crc, mrb_bool
ident<<=8;
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;
}
else {