1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-12-24 14:18: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) {
blockcount += (fsize2 / BLKSIZE);
}
if (blockcount * BLKSIZE < fsize) {
if (blockcount * BLKSIZE < fsize + HEADERSIZE) {
blockcount++;
}
putchar('C');