Cleaned up Packer::readPackHeader().

committer: mfx <mfx> 977342419 +0000
This commit is contained in:
Markus F.X.J. Oberhumer
2000-12-20 20:00:19 +00:00
parent 7d652fa42b
commit 1e1a078808
11 changed files with 41 additions and 32 deletions
+9 -2
View File
@@ -1925,8 +1925,15 @@ int PackW32Pe::canUnpack()
bool found_ph = false;
if (memcmp(isection[0].name,"UPX",3) == 0)
{
found_ph = readPackHeader(1024, isection[1].rawdataptr - 64) // current version
|| readPackHeader(1024, isection[2].rawdataptr); // old versions
// current version
fi->seek(isection[1].rawdataptr - 64, SEEK_SET);
found_ph = readPackHeader(1024);
if (!found_ph)
{
// old versions
fi->seek(isection[2].rawdataptr, SEEK_SET);
found_ph = readPackHeader(1024);
}
}
if (is_packed && found_ph)
return true;