mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-23 19:34:15 +08:00
(IntOpener.DecipherName): check for array bounds.
This commit is contained in:
parent
33e83b196d
commit
1f7e1e9f50
@ -214,7 +214,7 @@ namespace GameRes.Formats.CatSystem
|
||||
string alphabet = "zyxwvutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA";
|
||||
int k = (byte)((key >> 24) + (key >> 16) + (key >> 8) + key);
|
||||
int i;
|
||||
for (i = 0; name[i] != 0; ++i)
|
||||
for (i = 0; i < name.Length && name[i] != 0; ++i)
|
||||
{
|
||||
int j = alphabet.IndexOf ((char)name[i]);
|
||||
if (j != -1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user