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
+7 -1
View File
@@ -112,11 +112,17 @@ static Packer* try_unpack(Packer *p, InputFile *f)
try {
p->initPackHeader();
f->seek(0,SEEK_SET);
if (p->canUnpack())
int r = p->canUnpack();
if (r > 0)
{
f->seek(0,SEEK_SET);
return p;
}
if (r < 0)
{
// FIXME - could stop testing all other unpackers at this time
// see canUnpack() in packer.h
}
} catch (IOException&) {
} catch (...) {
delete p;