First-boot memstick screen: Attempt to fix some logic holes

This handles some cases better that I don't really see how they can
happen, but who knows. Intended to help #17683
This commit is contained in:
Henrik Rydgård
2023-07-12 11:29:24 +02:00
parent 5333091fa3
commit 63144340f5
4 changed files with 22 additions and 15 deletions
+1 -1
View File
@@ -241,7 +241,7 @@ void ISOFileSystem::ReadDirectory(TreeEntry *root) {
// Round down to avoid any false reports.
if (isFile && dir.firstDataSector + (dir.dataLength / 2048) > blockDevice->GetNumBlocks()) {
blockDevice->NotifyReadError();
ERROR_LOG(FILESYS, "File '%s' starts or ends outside ISO. firstDataSector: %d len: %d", entry->BuildPath().c_str(), dir.firstDataSector, dir.dataLength);
ERROR_LOG(FILESYS, "File '%s' starts or ends outside ISO. firstDataSector: %d len: %d", entry->BuildPath().c_str(), (int)dir.firstDataSector, (int)dir.dataLength);
}
if (entry->isDirectory && !relative) {