(TmrHiroAudio): sanity check.

This commit is contained in:
morkt 2016-09-02 09:36:14 +04:00
parent 5e61afc9f4
commit 40c7cbfe6a

View File

@ -52,7 +52,7 @@ namespace GameRes.Formats.TmrHiro
if (file.ReadByte() != 0) if (file.ReadByte() != 0)
return null; return null;
int length = ReadInt32 (file); int length = ReadInt32 (file);
if (length != file.Length - 9) if (-1 == length || length != file.Length - 9)
return null; return null;
var format = new WaveFormat var format = new WaveFormat
{ {