mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-04 22:19:02 +00:00
Lots of defect fixes
This commit is contained in:
parent
5dfc22a604
commit
fac9d74344
21 changed files with 341 additions and 95 deletions
|
|
@ -86,7 +86,11 @@ bool UnpackPKG(const fs::file& pkg_f, const std::string& dir, volatile f64& prog
|
|||
// Define decryption subfunction (`psp` arg selects the key for specific block)
|
||||
auto decrypt = [&](u64 offset, u64 size, bool psp) -> u64
|
||||
{
|
||||
pkg_f.seek(start_offset + header.data_offset + offset);
|
||||
if (pkg_f.seek(start_offset + header.data_offset + offset) < 0)
|
||||
{
|
||||
LOG_ERROR(LOADER, "PKG: Package file seek to %u failed.", start_offset + header.data_offset + offset);
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Read the data and set available size
|
||||
const u64 read = pkg_f.read(buf.get(), size);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue