1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-23 22:58:06 +11:00

cfspack: fix bug where we would underallocate blocks

This commit is contained in:
Virgil Dupras 2019-05-16 21:07:57 -04:00
parent ede228374c
commit a2d6cea72f

View File

@ -26,7 +26,7 @@ int spitblock(char *fullpath, char *fn)
if (fsize2 > 0) { if (fsize2 > 0) {
blockcount += (fsize2 / BLKSIZE); blockcount += (fsize2 / BLKSIZE);
} }
if (blockcount * BLKSIZE < fsize) { if (blockcount * BLKSIZE < fsize + HEADERSIZE) {
blockcount++; blockcount++;
} }
putchar('C'); putchar('C');