浏览代码

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

This is consistent with the other stream `read` procs
Feoramund 1 年之前
父节点
当前提交
8251f4d7d0
共有 1 个文件被更改,包括 1 次插入1 次删除
  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
 	b.last_read = .Invalid
 
 
 	if uint(offset) >= len(b.buf) {
 	if uint(offset) >= len(b.buf) {
-		err = .Invalid_Offset
+		err = .EOF
 		return
 		return
 	}
 	}
 	n = copy(p, b.buf[offset:])
 	n = copy(p, b.buf[offset:])