More fixes to image decryption check.

This commit is contained in:
Dv4L 2020-07-19 16:31:52 +02:00
parent da7961058a
commit 6381826d1b

View File

@ -2908,11 +2908,12 @@ namespace Components
// check if file should be skipped
auto skipFile = false;
if (!strncmp(&file[strlen(file) - 5], ".iwi", 4))
if (strlen(file) > 5 && ((strncmp(&file[strlen(file) - 4], ".iwi", 4) != 0)))
{
skipFile = true;
}
else if (memcmp(&fileBuffer[0], "IWi", 4))
else if (readSize >= 3 && (!memcmp(&fileBuffer[0], "IWi", 3)))
{
skipFile = true;
}