Преглед на файлове

os2: do read_entire_file in parts if the file size is 0

Laytan Laats преди 1 година
родител
ревизия
d410281766
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      core/os/os2/file_util.odin

+ 1 - 1
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) {