From beb76ca378af0f551699270875af6924c6e17177 Mon Sep 17 00:00:00 2001 From: stephena Date: Fri, 3 May 2013 10:45:49 +0000 Subject: [PATCH] Fixed regression in ZIP file handling compared to version 3.7.5; the check for the required ZIP version was being too aggressive, and causing some ZIP files to not open at all. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2716 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- src/common/ZipHandler.cxx | 4 ++++ src/emucore/FSNode.cxx | 5 +---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/common/ZipHandler.cxx b/src/common/ZipHandler.cxx index fa3f79e73..e9dbbe72d 100644 --- a/src/common/ZipHandler.cxx +++ b/src/common/ZipHandler.cxx @@ -579,9 +579,13 @@ ZipHandler::zip_error z_stream stream; int zerr; +#if 0 + // TODO - check newer versions of ZIP, and determine why this specific + // version (0x14) is important /* make sure we don't need a newer mechanism */ if (zip->header.version_needed > 0x14) return ZIPERR_UNSUPPORTED; +#endif /* reset the stream */ memset(&stream, 0, sizeof(stream)); diff --git a/src/emucore/FSNode.cxx b/src/emucore/FSNode.cxx index 1d694e3ee..922d25780 100644 --- a/src/emucore/FSNode.cxx +++ b/src/emucore/FSNode.cxx @@ -96,10 +96,7 @@ FilesystemNode FilesystemNode::getParent() const return *this; AbstractFSNode* node = _realNode->getParent(); - if (node == 0) - return *this; - else - return FilesystemNode(node); + return (node == 0) ? *this : FilesystemNode(node); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -