From 24f16b670cada20512873c828cdee9d0860bbf15 Mon Sep 17 00:00:00 2001 From: ansstuff Date: Mon, 29 Apr 2013 12:52:43 +0000 Subject: [PATCH] * added checking if the archive file has any files in it, because new 7z.dll confuses FDS files with archives (it recognizes the first "F" as a signature of an archive) --- trunk/src/drivers/win/archive.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/trunk/src/drivers/win/archive.cpp b/trunk/src/drivers/win/archive.cpp index d4349270..7175b9ec 100644 --- a/trunk/src/drivers/win/archive.cpp +++ b/trunk/src/drivers/win/archive.cpp @@ -438,6 +438,10 @@ ArchiveScanRecord FCEUD_ScanArchive(std::string fname) if (SUCCEEDED(object->GetNumberOfItems(&numFiles))) { + // AnS: added this check, because new 7z confuses FDS files with archives (it recognizes the first "F" as a signature of an archive) + if (numFiles == 0) + goto bomb; + ArchiveScanRecord asr(matchingFormat,(int)numFiles); //scan the filename of each item