pkgextract toll : print partially pkg header

This commit is contained in:
georgemoralis 2023-01-31 11:44:05 +02:00
parent bfb60e4c84
commit bbe33581c7
4 changed files with 101 additions and 18 deletions

View file

@ -18,7 +18,6 @@ bool PKG::open(const std::string& filepath) {
return false;
}
pkgSize = file.getFileSize();
PKGHeader pkgheader;
file.ReadBE(pkgheader);
//we have already checked magic should be ok
@ -39,7 +38,7 @@ bool PKG::extract(const std::string& filepath, const std::string& extractPath, s
return false;
}
pkgSize = file.getFileSize();
PKGHeader pkgheader;
file.ReadBE(pkgheader);
if (pkgheader.pkg_size > pkgSize)