Packer::canUnpack() now can return -1.

committer: mfx <mfx> 962126554 +0000
This commit is contained in:
Markus F.X.J. Oberhumer
2000-06-27 17:22:34 +00:00
parent 87a1b66847
commit 51c6566092
24 changed files with 109 additions and 56 deletions
+3 -3
View File
@@ -172,7 +172,7 @@ void PackUnix::pack(OutputFile *fo)
total_out += ph.c_len;
}
if ((off_t)total_in != file_size)
throw EOFException();
throwEOFException();
// write block end marker (uncompressed size 0)
fo->write("\x00\x00\x00\x00", 4);
@@ -203,7 +203,7 @@ void PackUnix::pack(OutputFile *fo)
// Generic Unix canUnpack().
**************************************************************************/
bool PackUnix::canUnpack()
int PackUnix::canUnpack()
{
upx_byte buf[128];
const int bufsize = sizeof(buf);
@@ -310,7 +310,7 @@ void PackUnix::unpack(OutputFile *fo)
// all bytes must be written
if (ph.version > 8 && total_out != orig_file_size)
throw EOFException();
throwEOFException();
// finally test the checksums
if (ph.c_adler != c_adler || ph.u_adler != u_adler)