Fix Failed to dump the ROM message being shown when dumping trimmed ROM

This commit is contained in:
RocketRobz 2021-01-28 09:35:26 -07:00
parent bf39bda222
commit 59f9ce9ad4

View File

@ -570,7 +570,7 @@ void ndsCardDump(void) {
for (u32 i = 0; i < 0x8000; i += 0x200) {
cardRead (src+i, copyBuf+i);
}
if (fwrite(copyBuf, 1, (currentSize>=0x8000 ? 0x8000 : currentSize), destinationFile) < 0x8000) {
if (fwrite(copyBuf, 1, (currentSize>=0x8000 ? 0x8000 : currentSize), destinationFile) < 1) {
dumpFailMsg();
break;
}
@ -726,7 +726,7 @@ void gbaCartDump(void) {
cmd[1] = i,
writeChange(cmd);
readChange();
if (fwrite(GBAROM + (0x1000 >> 1), 0x1000, 1, destinationFile) < 0x1000) {
if (fwrite(GBAROM + (0x1000 >> 1), 0x1000, 1, destinationFile) < 1) {
dumpFailMsg();
break;
}