From a2d6cea72fa017c3c587b5ede3d55dec6f2bb40d Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Thu, 16 May 2019 21:07:57 -0400 Subject: [PATCH] cfspack: fix bug where we would underallocate blocks --- tools/cfspack/cfspack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/cfspack/cfspack.c b/tools/cfspack/cfspack.c index e65d906..106bd1b 100644 --- a/tools/cfspack/cfspack.c +++ b/tools/cfspack/cfspack.c @@ -26,7 +26,7 @@ int spitblock(char *fullpath, char *fn) if (fsize2 > 0) { blockcount += (fsize2 / BLKSIZE); } - if (blockcount * BLKSIZE < fsize) { + if (blockcount * BLKSIZE < fsize + HEADERSIZE) { blockcount++; } putchar('C');