(GP8): recognize non-zero coordinates.

This commit is contained in:
morkt 2018-08-20 14:38:49 +04:00
parent 6010c92b3e
commit b171ac9b4b

View File

@ -43,7 +43,9 @@ namespace GameRes.Formats.Elf
{ {
if (file.Length <= 0x408) if (file.Length <= 0x408)
return null; return null;
if (0 != file.ReadInt32()) int x = file.ReadInt16();
int y = file.ReadInt16();
if (x < 0 || y < 0 || x > 0x300 || y > 0x300)
return null; return null;
int w = file.ReadInt16(); int w = file.ReadInt16();
int h = file.ReadInt16(); int h = file.ReadInt16();