(PSB): ignore parse errors caused by invalid key.

This commit is contained in:
morkt 2017-02-20 12:19:47 +04:00
parent 7c82b909e0
commit 872842d408

View File

@ -74,17 +74,21 @@ namespace GameRes.Formats.Emote
{
foreach (var key in KnownKeys)
{
if (reader.Parse (key))
try
{
var dir = reader.GetTextures();
if (null == dir)
dir = reader.GetLayers();
if (null == dir || 0 == dir.Count)
return null;
return new ArcFile (file, this, dir);
if (reader.Parse (key))
{
var dir = reader.GetTextures();
if (null == dir)
dir = reader.GetLayers();
if (null == dir || 0 == dir.Count)
return null;
return new ArcFile (file, this, dir);
}
if (!reader.IsEncrypted)
break;
}
if (!reader.IsEncrypted)
break;
catch { /* ignore parse errors caused by invalid key */ }
}
if (reader.ParseNonEncrypted())
{