mirror of
https://github.com/cmclark00/retro-imager.git
synced 2025-05-18 16:05:21 +01:00
FAT editing: fix creating files that are multiple of cluster size
Closes #568
This commit is contained in:
parent
493869e47a
commit
65f6a07fae
2 changed files with 8 additions and 1 deletions
|
@ -320,7 +320,7 @@ void DeviceWrapperFatPartition::writeFile(const QString &filename, const QByteAr
|
|||
break;
|
||||
}
|
||||
|
||||
if (clustersNeeded)
|
||||
if (clustersNeeded && contents.length() % _bytesPerCluster)
|
||||
{
|
||||
/* Zero out last cluster tip */
|
||||
uint32_t extraBytesAtEndOfCluster = _bytesPerCluster - (contents.length() % _bytesPerCluster);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue