Commit c837d29e authored by Wojciech Jaszczak's avatar Wojciech Jaszczak

Remove unnecessary condition in AssertOffsetAndLength.

Condition is already checked and covered in the following condition, the second one was excess.
Signed-off-by: 's avatarWojciech Jaszczak <jaszczakw@gmail.com>
parent f4a5c9de
......@@ -129,8 +129,7 @@ namespace FlatBuffers
private void AssertOffsetAndLength(int offset, int length)
{
if (offset < 0 ||
offset >= _buffer.Length ||
offset + length > _buffer.Length)
offset > _buffer.Length - length)
throw new ArgumentOutOfRangeException();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment