X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/1fa0de6285fdd9241fe29474319f1bd6743828c0..c07b7093434b8bcdb038f7c6056cb34f772990d7:/tools/firmware-utils/src/trx.c 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 */