Zero-pad files which don't line up with sector boundaries.

This commit is contained in:
David Given
2022-08-27 16:04:46 +02:00
parent 0d502933ae
commit c5fd24496f

View File

@@ -366,7 +366,7 @@ void insertFile(const std::string& filename)
uint16_t checksum = 0;
while (!inputFile.eof())
{
uint8_t buffer[SECTOR_SIZE];
uint8_t buffer[SECTOR_SIZE] = {};
inputFile.read((char*) buffer, sizeof(buffer));
for (int i=0; i<inputFile.gcount(); i++)
checksum += buffer[i];