VirtualDiscFileSystem: Fix out-of-range array read in fileList
This commit is contained in:
parent
4d4c325765
commit
942021e5cd
1 changed files with 1 additions and 1 deletions
|
@ -645,7 +645,7 @@ PSPFileInfo VirtualDiscFileSystem::GetFileInfo(std::string filename) {
|
|||
localtime_r((time_t*)&mtime, &x.mtime);
|
||||
}
|
||||
|
||||
x.startSector = fileList[fileIndex].firstBlock;
|
||||
// x.startSector was set above in "if (fileIndex != -1)".
|
||||
x.numSectors = (x.size+2047)/2048;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue