(DSK): ignore empty entries.

This commit is contained in:
morkt 2018-01-11 20:21:29 +04:00
parent dabed60304
commit eb8e7598a0

View File

@ -51,6 +51,9 @@ namespace GameRes.Formats.Abogado
{ "SOUND", "ADP" }, { "SOUND", "ADP" },
{ "PCM1", "ADP" }, { "PCM1", "ADP" },
{ "PCM2", "ADP" }, { "PCM2", "ADP" },
{ "PCM", "ADP" },
{ "GRAPHIC", "KG" },
{ "SCENARIO", "SCF" },
}; };
public override ArcFile TryOpen (ArcView file) public override ArcFile TryOpen (ArcView file)
@ -76,6 +79,8 @@ namespace GameRes.Formats.Abogado
for (int i = 0; i < count; ++i) for (int i = 0; i < count; ++i)
{ {
var name = pft.ReadCString (8); var name = pft.ReadCString (8);
if (name.Length > 0)
{
if (!string.IsNullOrEmpty (ext)) if (!string.IsNullOrEmpty (ext))
name = Path.ChangeExtension (name, ext); name = Path.ChangeExtension (name, ext);
var entry = FormatCatalog.Instance.Create<Entry> (name); var entry = FormatCatalog.Instance.Create<Entry> (name);
@ -85,6 +90,7 @@ namespace GameRes.Formats.Abogado
return null; return null;
dir.Add (entry); dir.Add (entry);
} }
}
return new ArcFile (file, this, dir); return new ArcFile (file, this, dir);
} }
} }