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