Silently fail if we are past the end of data

This commit is contained in:
Michael Becker 2016-09-19 00:37:36 -04:00
parent fa270b4bfd
commit d419a495c3

View File

@ -95,6 +95,9 @@ namespace UniversalEditor.Accessors
protected internal override int ReadInternal(byte[] buffer, int start, int count)
{
if (Position >= _data.Length) {
return 0;
}
System.Array.Copy(_data, Position, buffer, start, count);
Position += count;
return count;