diff --git a/core/os/os2/file_util.odin b/core/os/os2/file_util.odin index 2dc457f058f..e328f9a02e4 100644 --- a/core/os/os2/file_util.odin +++ b/core/os/os2/file_util.odin @@ -130,7 +130,7 @@ read_entire_file_from_file :: proc(f: ^File, allocator: runtime.Allocator) -> (d return } - if has_size { + if has_size && size > 0 { total: int data = make([]byte, size, allocator) or_return for total < len(data) {