Remove redundant `Stream.Read` result check in `LsmvImport`

fixes a7e1c8fd0
This commit is contained in:
YoshiRulz 2024-07-04 06:18:54 +10:00
parent b818f5325a
commit da25438b1f
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
1 changed files with 1 additions and 2 deletions

View File

@ -36,8 +36,7 @@ namespace BizHawk.Client.Common.movie.import
using var fs = new FileStream(SourceFile.FullName, FileMode.Open, FileAccess.Read); using var fs = new FileStream(SourceFile.FullName, FileMode.Open, FileAccess.Read);
{ {
byte[] data = new byte[4]; byte[] data = new byte[4];
var bytesRead = fs.Read(data, offset: 0, count: data.Length); _ = fs.Read(data, offset: 0, count: data.Length); // if stream is too short, the next check will catch it
Debug.Assert(bytesRead == data.Length, "reached end-of-file while reading header");
if (!data.SequenceEqual(Zipheader)) if (!data.SequenceEqual(Zipheader))
{ {
Result.Errors.Add("This is not a zip file."); Result.Errors.Add("This is not a zip file.");