mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-25 08:14:45 +02:00
Workaround for a weird I/O issue
This commit is contained in:
@@ -382,11 +382,15 @@ u32 ISOFileSystem::OpenFile(std::string filename, FileAccess access, const char
|
||||
{
|
||||
u32 sectorStart = 0xFFFFFFFF, readSize = 0xFFFFFFFF;
|
||||
parseLBN(filename, §orStart, &readSize);
|
||||
if (sectorStart >= blockDevice->GetNumBlocks())
|
||||
if (sectorStart > blockDevice->GetNumBlocks())
|
||||
{
|
||||
WARN_LOG(FILESYS, "Unable to open raw sector: %s, sector %08x, max %08x", filename.c_str(), sectorStart, blockDevice->GetNumBlocks());
|
||||
WARN_LOG(FILESYS, "Unable to open raw sector, out of range: %s, sector %08x, max %08x", filename.c_str(), sectorStart, blockDevice->GetNumBlocks());
|
||||
return 0;
|
||||
}
|
||||
else if (sectorStart == blockDevice->GetNumBlocks())
|
||||
{
|
||||
ERROR_LOG(FILESYS, "Should not be able to open the block after the last on disc! %08x", sectorStart);
|
||||
}
|
||||
|
||||
DEBUG_LOG(FILESYS, "Got a raw sector open: %s, sector %08x, size %08x", filename.c_str(), sectorStart, readSize);
|
||||
u32 newHandle = hAlloc->GetNewHandle();
|
||||
|
||||
Reference in New Issue
Block a user