Explorar o código

Return `.EOF` in `bytes.buffer_read_at` instead

This is consistent with the other stream `read` procs
Feoramund hai 1 ano
pai
achega
8251f4d7d0
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      core/bytes/buffer.odin

+ 1 - 1
core/bytes/buffer.odin

@@ -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:])