diff options
| author | cremno <[email protected]> | 2014-09-04 12:34:37 +0200 |
|---|---|---|
| committer | cremno <[email protected]> | 2014-09-04 12:34:37 +0200 |
| commit | 610d1d4afa081fad02b59b1f55cfdf13bca1b5af (patch) | |
| tree | 0fb36d84c189283d031f5739a3e7ee55b5a9c187 /src | |
| parent | 6b302d80a364c9433af68a0d07a1a524c020e017 (diff) | |
| download | mruby-610d1d4afa081fad02b59b1f55cfdf13bca1b5af.tar.gz mruby-610d1d4afa081fad02b59b1f55cfdf13bca1b5af.zip | |
fix strict aliasing rule violation
Diffstat (limited to 'src')
| -rw-r--r-- | src/load.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/load.c b/src/load.c index bf69fdca1..30b466f6b 100644 --- a/src/load.c +++ b/src/load.c @@ -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 { |
