summaryrefslogtreecommitdiffstats
path: root/tools/firmware-utils/src/trx.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/firmware-utils/src/trx.c')
-rw-r--r--tools/firmware-utils/src/trx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/firmware-utils/src/trx.c b/tools/firmware-utils/src/trx.c
index 426a6b583..8e95d98d7 100644
--- a/tools/firmware-utils/src/trx.c
+++ b/tools/firmware-utils/src/trx.c
@@ -276,7 +276,7 @@ int main(int argc, char **argv)
(fsmark)?fsmark:cur_len - offsetof(struct trx_header, flag_version));
p->crc32 = STORE32_LE(p->crc32);
- p->len = (fsmark)?fsmark:cur_len - offsetof(struct trx_header, flag_version);
+ p->len = STORE32_LE((fsmark) ? fsmark : cur_len);
p->len = STORE32_LE(p->len);
/* restore TRXv2 bin-header */