Silently fail if we are past the end of data
This commit is contained in:
parent
fa270b4bfd
commit
d419a495c3
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user