(Ai6Win): check for invalid chars to reduce false positives.

This commit is contained in:
morkt 2017-01-27 13:19:58 +04:00
parent dffa9e1e0f
commit 86ae93a83b

View File

@ -69,7 +69,7 @@ namespace GameRes.Formats.Silky
for (int j = 0; j < name_length; ++j) for (int j = 0; j < name_length; ++j)
{ {
name_buffer[j] -= key--; name_buffer[j] -= key--;
if (name_buffer[j] < 0x20) if (VFS.InvalidFileNameChars.Contains ((char)name_buffer[j])) // XXX
return null; return null;
} }
var name = Encodings.cp932.GetString (name_buffer, 0, name_length); var name = Encodings.cp932.GetString (name_buffer, 0, name_length);