Fix IDE0048
This commit is contained in:
committed by
Pavel Penev
parent
65e28d5562
commit
8ee6957e6a
@@ -164,7 +164,7 @@ namespace OpenRA.Mods.Cnc.FileSystem
|
||||
if (count < 0)
|
||||
throw new ArgumentOutOfRangeException(nameof(count), "Non-negative number required.");
|
||||
|
||||
if (offset + (count * 2) > s.Length)
|
||||
if (offset + count * 2 > s.Length)
|
||||
throw new ArgumentException($"Bytes to read {count * 2} and offset {offset} greater than stream length {s.Length}.");
|
||||
|
||||
s.Seek(offset, SeekOrigin.Begin);
|
||||
|
||||
Reference in New Issue
Block a user