555e68a19d
We've copied exactly `toCopy` bytes, so the byte after the last copied has index `toCopy`. Note that if `toCopy` is exactly (bufferSize - 1), the previous code would write to memory outside of the buffer.