From 40c7cbfe6aaffa5a842542fb6652f25de8cb74c6 Mon Sep 17 00:00:00 2001 From: morkt Date: Fri, 2 Sep 2016 09:36:14 +0400 Subject: [PATCH] (TmrHiroAudio): sanity check. --- ArcFormats/Tmr-Hiro/AudioTmr.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ArcFormats/Tmr-Hiro/AudioTmr.cs b/ArcFormats/Tmr-Hiro/AudioTmr.cs index f5e252d8..a7bcf13e 100644 --- a/ArcFormats/Tmr-Hiro/AudioTmr.cs +++ b/ArcFormats/Tmr-Hiro/AudioTmr.cs @@ -52,7 +52,7 @@ namespace GameRes.Formats.TmrHiro if (file.ReadByte() != 0) return null; int length = ReadInt32 (file); - if (length != file.Length - 9) + if (-1 == length || length != file.Length - 9) return null; var format = new WaveFormat {