From 98d6e6c5550920f014efa89750e575a7d9a2c256 Mon Sep 17 00:00:00 2001 From: morkt Date: Mon, 23 May 2016 22:39:53 +0400 Subject: [PATCH] use string.IsNullOrWhiteSpace to check for valid filenames. --- ArcFormats/GSD/ArcGSP.cs | 2 +- ArcFormats/Interheart/ArcFPK.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ArcFormats/GSD/ArcGSP.cs b/ArcFormats/GSD/ArcGSP.cs index f80224bd..69eaee83 100644 --- a/ArcFormats/GSD/ArcGSP.cs +++ b/ArcFormats/GSD/ArcGSP.cs @@ -54,7 +54,7 @@ namespace GameRes.Formats.BlackRainbow for (int i = 0; i < count; ++i) { string name = file.View.ReadString (index_offset+8, 0x38); - if (0 == name.Length) + if (string.IsNullOrWhiteSpace (name)) return null; var entry = FormatCatalog.Instance.Create (name); entry.Offset = file.View.ReadUInt32 (index_offset); diff --git a/ArcFormats/Interheart/ArcFPK.cs b/ArcFormats/Interheart/ArcFPK.cs index 6c487304..2aea1e91 100644 --- a/ArcFormats/Interheart/ArcFPK.cs +++ b/ArcFormats/Interheart/ArcFPK.cs @@ -68,7 +68,7 @@ namespace GameRes.Formats.CandySoft for (int i = 0; i < count; ++i) { string name = file.View.ReadString (index_offset+8, (uint)name_size); - if (0 == name.Length) + if (string.IsNullOrWhiteSpace (name)) return null; var entry = FormatCatalog.Instance.Create (name); entry.Offset = file.View.ReadUInt32 (index_offset);