From 7abc9c3ed271ed787d57c2f074c9a696fb7b2572 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Tue, 17 Dec 2013 03:01:06 +0200 Subject: [PATCH] Detect eof from the parser, not input file Some files have an embedded logical eof, so waiting for the end of the physical file would (and did) cause an infinite loop. --- tool/packer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tool/packer.cpp b/tool/packer.cpp index ff69912..3576472 100644 --- a/tool/packer.cpp +++ b/tool/packer.cpp @@ -79,7 +79,7 @@ bool Packer::detect_raw(IO::Seekable &in) IO::SeekOffset offset = in.tell(); bool raw = false; DataFile::Parser parser(in, "-"); - while(!raw && !in.eof() && in.tell()<10240) + while(!raw && parser && in.tell()<10240) { try { -- 2.43.0