Browse Source

os2: fix read_entire_file wrong slice end variable

Laytan Laats 11 months ago
parent
commit
ce53805d94
1 changed files with 1 additions and 1 deletions
  1. 1 1
      core/os/os2/file_util.odin

+ 1 - 1
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: int
 			n, err = read(f, buffer[:])
 			n, err = read(f, buffer[:])
 			total += n
 			total += n
-			append_elems(&out_buffer, ..buffer[:total])
+			append_elems(&out_buffer, ..buffer[:n])
 			if err != nil {
 			if err != nil {
 				if err == .EOF || err == .Broken_Pipe {
 				if err == .EOF || err == .Broken_Pipe {
 					err = nil
 					err = nil