mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-25 04:14:13 +08:00
use string.IsNullOrWhiteSpace to check for valid filenames.
This commit is contained in:
parent
f44a2a5e9c
commit
98d6e6c555
@ -54,7 +54,7 @@ namespace GameRes.Formats.BlackRainbow
|
|||||||
for (int i = 0; i < count; ++i)
|
for (int i = 0; i < count; ++i)
|
||||||
{
|
{
|
||||||
string name = file.View.ReadString (index_offset+8, 0x38);
|
string name = file.View.ReadString (index_offset+8, 0x38);
|
||||||
if (0 == name.Length)
|
if (string.IsNullOrWhiteSpace (name))
|
||||||
return null;
|
return null;
|
||||||
var entry = FormatCatalog.Instance.Create<Entry> (name);
|
var entry = FormatCatalog.Instance.Create<Entry> (name);
|
||||||
entry.Offset = file.View.ReadUInt32 (index_offset);
|
entry.Offset = file.View.ReadUInt32 (index_offset);
|
||||||
|
@ -68,7 +68,7 @@ namespace GameRes.Formats.CandySoft
|
|||||||
for (int i = 0; i < count; ++i)
|
for (int i = 0; i < count; ++i)
|
||||||
{
|
{
|
||||||
string name = file.View.ReadString (index_offset+8, (uint)name_size);
|
string name = file.View.ReadString (index_offset+8, (uint)name_size);
|
||||||
if (0 == name.Length)
|
if (string.IsNullOrWhiteSpace (name))
|
||||||
return null;
|
return null;
|
||||||
var entry = FormatCatalog.Instance.Create<Entry> (name);
|
var entry = FormatCatalog.Instance.Create<Entry> (name);
|
||||||
entry.Offset = file.View.ReadUInt32 (index_offset);
|
entry.Offset = file.View.ReadUInt32 (index_offset);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user