aboutsummaryrefslogtreecommitdiff
path: root/core/bytes
diff options
context:
space:
mode:
authorFeoramund <161657516+Feoramund@users.noreply.github.com>2024-08-19 02:05:05 -0400
committerLaytan <laytanlaats@hotmail.com>2024-08-28 19:53:20 +0200
commit8251f4d7d009ce5f0e7d9293d70458971dd4c553 (patch)
tree034ad99590c6e730f7f43501197a7fc41cec6f77 /core/bytes
parentda49f7eb4e31240f2d83260357a389c6b7a08873 (diff)
Return `.EOF` in `bytes.buffer_read_at` instead
This is consistent with the other stream `read` procs
Diffstat (limited to 'core/bytes')
-rw-r--r--core/bytes/buffer.odin2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/bytes/buffer.odin b/core/bytes/buffer.odin
index f46fb826a..995068aad 100644
--- a/core/bytes/buffer.odin
+++ b/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:])