From 4d4172b8b8d926edcbadfd557d8847571a7dbf92 Mon Sep 17 00:00:00 2001 From: morkt Date: Tue, 29 May 2018 21:06:47 +0400 Subject: [PATCH] (BDF): ignore empty entries. --- ArcFormats/Zyx/ArcBDF.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ArcFormats/Zyx/ArcBDF.cs b/ArcFormats/Zyx/ArcBDF.cs index 8fe77757..ab09cd0f 100644 --- a/ArcFormats/Zyx/ArcBDF.cs +++ b/ArcFormats/Zyx/ArcBDF.cs @@ -211,10 +211,13 @@ namespace GameRes.Formats.Zyx Width = file.View.ReadInt32 (index_offset+0x14), Height = file.View.ReadInt32 (index_offset+0x18), }; - if (entry.Size < 4 || entry.Width <= 0 || entry.Height <= 0 - || !entry.CheckPlacement (file.MaxOffset)) - return null; - dir.Add (entry); + if (entry.Size > 0) + { + if (entry.Size < 4 || entry.Width <= 0 || entry.Height <= 0 + || !entry.CheckPlacement (file.MaxOffset)) + return null; + dir.Add (entry); + } index_offset += 0x1C; } return new BdfArchive (file, this, dir);