From 518e73149990ce1bee5fa4cff9aaaf7494e94f61 Mon Sep 17 00:00:00 2001 From: morkt Date: Tue, 27 Sep 2016 16:48:12 +0400 Subject: [PATCH] (CgOpener): sanity check. --- ArcFormats/ArcCG.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ArcFormats/ArcCG.cs b/ArcFormats/ArcCG.cs index 2873427f..1fe42ecb 100644 --- a/ArcFormats/ArcCG.cs +++ b/ArcFormats/ArcCG.cs @@ -58,6 +58,8 @@ namespace GameRes.Formats.Parsley for (int i = 0; i < count; ++i) { var name = file.View.ReadString (index_offset, 0x20); + if (string.IsNullOrWhiteSpace (name)) + return null; var entry = FormatCatalog.Instance.Create (name); entry.Offset = file.View.ReadUInt32 (index_offset+0x20); entry.Size = file.View.ReadUInt32 (index_offset+0x24);