force size to be zero

This commit is contained in:
Ada 2024-03-08 15:19:24 +00:00
parent 47a01a8296
commit cd25e11f8e
No known key found for this signature in database
GPG key ID: 066E56D5C9F4E50D
2 changed files with 4 additions and 2 deletions

View file

@ -277,7 +277,7 @@ Rust::Result<ArchiveBase::FormatInfo, HorizonResult> ExtSaveDataArchive::getForm
return Err(Result::FS::NotFormatted);
}
FormatInfo ret;
FormatInfo ret = {};
auto [success, bytesRead] = file.readBytes(&ret, sizeof(FormatInfo));
file.close();
@ -286,6 +286,8 @@ Rust::Result<ArchiveBase::FormatInfo, HorizonResult> ExtSaveDataArchive::getForm
return Err(Result::FS::NotFormatted);
}
ret.size = 0;
return Ok(ret);
}

View file

@ -561,7 +561,7 @@ void FSService::createExtSaveData(u32 messagePointer) {
const u32 smdhPointer = mem.read32(messagePointer + 44);
ArchiveBase::FormatInfo info {
.size = (u32) (sizeLimit * 0x200),
.size = 0,
.numOfDirectories = numOfDirectories,
.numOfFiles = numOfFiles,
.duplicateData = false