os2: fix read_entire_file wrong slice end variable

This commit is contained in:
Laytan Laats
2024-08-23 20:25:19 +02:00
parent 963e8544f4
commit ce53805d94

View File

@@ -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