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