Return .EOF in bytes.buffer_read_at instead

This is consistent with the other stream `read` procs
This commit is contained in:
Feoramund
2024-08-19 02:05:05 -04:00
committed by Laytan
parent da49f7eb4e
commit 8251f4d7d0

View File

@@ -249,7 +249,7 @@ buffer_read_at :: proc(b: ^Buffer, p: []byte, offset: int) -> (n: int, err: io.E
b.last_read = .Invalid
if uint(offset) >= len(b.buf) {
err = .Invalid_Offset
err = .EOF
return
}
n = copy(p, b.buf[offset:])