fix: shouldn't multiply by CHUNKS, but by SECTOR

This commit is contained in:
2025-09-04 13:28:13 +02:00
parent f020347f71
commit d933931829

View File

@@ -117,5 +117,5 @@ size_t mcx_calcsize(const u8 *restrict buf) {
size_t size = 0; size_t size = 0;
for (uint i = 0; i < CHUNKS; i++) for (uint i = 0; i < CHUNKS; i++)
size += *(buf + (i * 4) + 3); size += *(buf + (i * 4) + 3);
return (size * CHUNKS) + (TABLE * 4); return (size * SECTOR) + (TABLE * 4);
} }