From cdca345d7424c77e151a65e84c638b258f216d50 Mon Sep 17 00:00:00 2001 From: Damian Tarnawski Date: Tue, 2 Sep 2025 13:42:25 +0200 Subject: [PATCH] Handle optional allocator error when appending read bytes in read_entire_file_from_file --- 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 407c38f88..13d6db661 100644 --- a/core/os/os2/file_util.odin +++ b/core/os/os2/file_util.odin @@ -151,7 +151,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[:n]) + append_elems(&out_buffer, ..buffer[:n]) or_return if err != nil { if err == .EOF || err == .Broken_Pipe { err = nil