diff options
author | mbm <mbm@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2005-05-25 18:31:13 +0000 |
---|---|---|
committer | mbm <mbm@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2005-05-25 18:31:13 +0000 |
commit | 0f9f93a6c4a3f65e6647e7c687a145c0dba0e197 (patch) | |
tree | 801ed6666864a19fc770337372c796b54f9048f8 /package/openwrt | |
parent | 4a3db3ee298834bd8810ff6b8d32b1b3af4c0125 (diff) |
fix rounding error
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@1058 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/openwrt')
-rw-r--r-- | package/openwrt/jffs2root.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/package/openwrt/jffs2root.c b/package/openwrt/jffs2root.c index aa718da59..36b928ff4 100644 --- a/package/openwrt/jffs2root.c +++ b/package/openwrt/jffs2root.c @@ -99,7 +99,7 @@ int main(int argc, char **argv) printf("Partition already moved outside trx\n"); } else { init_crc32(); - ptr->offsets[2] += mtdInfo.erasesize; + ptr->offsets[2] += (mtdInfo.erasesize - 1); ptr->offsets[2] &= ~(mtdInfo.erasesize - 1); ptr->len = ptr->offsets[2]; ptr->crc32 = crc32buf((void *) &(ptr->flag_version), ptr->len - offsetof(struct trx_header, flag_version)); |