aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/firmware-utils/src/trx.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/firmware-utils/src/trx.c b/tools/firmware-utils/src/trx.c
index 8e95d98d7a..e3b6a3941f 100644
--- a/tools/firmware-utils/src/trx.c
+++ b/tools/firmware-utils/src/trx.c
@@ -273,11 +273,10 @@ int main(int argc, char **argv)
}
p->crc32 = crc32buf((char *) &p->flag_version,
- (fsmark)?fsmark:cur_len - offsetof(struct trx_header, flag_version));
+ ((fsmark)?fsmark:cur_len) - offsetof(struct trx_header, flag_version));
p->crc32 = STORE32_LE(p->crc32);
p->len = STORE32_LE((fsmark) ? fsmark : cur_len);
- p->len = STORE32_LE(p->len);
/* restore TRXv2 bin-header */
if (trx_version == 2) {