From 69173994e63079ef3b9be9cdffe073fa6091c281 Mon Sep 17 00:00:00 2001 From: Christian Walther Date: Wed, 29 Jun 2011 22:23:55 +0200 Subject: [PATCH] Cope with unknown resource name extensions. (E.g. a mistakenly included Thumbs.db) --- Sources/Plasma/PubUtilLib/plClientResMgr/plClientResMgr.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Sources/Plasma/PubUtilLib/plClientResMgr/plClientResMgr.cpp b/Sources/Plasma/PubUtilLib/plClientResMgr/plClientResMgr.cpp index 2b0b7a0e..430d2232 100644 --- a/Sources/Plasma/PubUtilLib/plClientResMgr/plClientResMgr.cpp +++ b/Sources/Plasma/PubUtilLib/plClientResMgr/plClientResMgr.cpp @@ -101,6 +101,9 @@ void plClientResMgr::ILoadResources(const char* resfile) // Original Myst5 format only is known to support Targa, // so default fallback is targa // TODO - Add plTarga::ReadFromStream() + // for now, just skip the unknown resource and put NULL into the map + res_size = in.ReadSwap32(); + in.Skip(res_size); } (*this->ClientResources)[res_name] = res_data;