From ce53805d94eefbecac49d36407b0cc707bc988ff Mon Sep 17 00:00:00 2001 From: Laytan Laats Date: Fri, 23 Aug 2024 20:25:19 +0200 Subject: [PATCH] os2: fix read_entire_file wrong slice end variable --- core/os/os2/file_util.odin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/os/os2/file_util.odin b/core/os/os2/file_util.odin index 90ce96223..2dc457f05 100644 --- a/core/os/os2/file_util.odin +++ b/core/os/os2/file_util.odin @@ -154,7 +154,7 @@ read_entire_file_from_file :: proc(f: ^File, allocator: runtime.Allocator) -> (d n: int n, err = read(f, buffer[:]) total += n - append_elems(&out_buffer, ..buffer[:total]) + append_elems(&out_buffer, ..buffer[:n]) if err != nil { if err == .EOF || err == .Broken_Pipe { err = nil