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