Rewrote PackHeader handling. In particuliar, Packer::putPackHeader()

was renamed to patchPackHeader(), and it is now under control of
the usual checkPatch() patch-order.

committer: mfx <mfx> 976601615 +0000
This commit is contained in:
Markus F.X.J. Oberhumer
2000-12-12 06:13:35 +00:00
parent a8eac4f2f8
commit c6481575f9
16 changed files with 175 additions and 175 deletions
+2 -2
View File
@@ -69,7 +69,7 @@ bool PackUnix::canPack()
unsigned char buf[256];
fi->seek(-(long)sizeof(buf), SEEK_END);
fi->readx(buf,sizeof(buf));
if (find_le32(buf,sizeof(buf),UPX_MAGIC_LE32)) // note: always le32
if (find_le32(buf,sizeof(buf),UPX_MAGIC_LE32) >= 0) // note: always le32
throwAlreadyPacked();
return true;
@@ -187,7 +187,7 @@ void PackUnix::pack(OutputFile *fo)
// write packheader
const int hsize = ph.getPackHeaderSize();
set_le32(obuf, ph.magic); // note: always le32
putPackHeader(obuf, hsize);
patchPackHeader(obuf, hsize);
fo->write(obuf, hsize);
// write overlay offset (needed for decompression)