firmware-utils: fix build on big endian systems
authorHauke Mehrtens <hauke@hauke-m.de>
Tue, 21 Jun 2011 21:13:58 +0000 (21:13 +0000)
committerHauke Mehrtens <hauke@hauke-m.de>
Tue, 21 Jun 2011 21:13:58 +0000 (21:13 +0000)
This closes #9446

SVN-Revision: 27255

tools/firmware-utils/src/trx2edips.c

index 3869648e8cd433f1026bd9f78686942f0f95190b..f8d068d5020593ab693df2e32c15105c6946ad74 100644 (file)
@@ -157,7 +157,7 @@ int main(int argc, char *argv[])
        /* make the 3 partition beeing 12 bytes closer from the header */
        memcpy(buf + LOAD32_LE(p->offsets[2]) - EDIMAX_HDR_LEN, buf + LOAD32_LE(p->offsets[2]), length - LOAD32_LE(p->offsets[2]));
        /* recompute the crc32 check */
-       p->crc32 = STORE32_LE(crc32buf((char *) &(LOAD32_LE(p->flag_version)), length - offsetof(struct trx_header, flag_version)));
+       p->crc32 = STORE32_LE(crc32buf((char *) &p->flag_version, length - offsetof(struct trx_header, flag_version)));
 
        eh.sign = STORE32_LE(EDIMAX_PS16);
        eh.length = STORE32_LE(length);