Remove unnecessary condition in AssertOffsetAndLength.

Condition is already checked and covered in the following condition, the second one was excess.

Signed-off-by: Wojciech Jaszczak <jaszczakw@gmail.com>
This commit is contained in:
Wojciech Jaszczak 2016-04-08 19:56:02 +02:00
parent f4a5c9de50
commit c837d29eab
1 changed files with 1 additions and 2 deletions

View File

@ -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();
}