(ReadMetaData): check unpacked bitmap signature.

This commit is contained in:
morkt 2015-03-05 17:37:22 +04:00
parent 6f1e850140
commit 722d907504

View File

@ -66,6 +66,8 @@ namespace GameRes.Formats.Tactics
{ {
reader.Unpack(); reader.Unpack();
var bmp = reader.Data; var bmp = reader.Data;
if (bmp[0] != 'B' || bmp[1] != 'M')
return null;
return new TgfMetaData return new TgfMetaData
{ {
Width = LittleEndian.ToUInt32 (bmp, 0x12), Width = LittleEndian.ToUInt32 (bmp, 0x12),