Browse Source

fix error handling in os2.read_entire_file_from_file()

even when an error in file_size() happened, os2.ERROR_NONE was returned
DerTee 1 year ago
parent
commit
6422e49255
1 changed files with 1 additions and 0 deletions
  1. 1 0
      core/os/os2/file_util.odin

+ 1 - 0
core/os/os2/file_util.odin

@@ -126,6 +126,7 @@ read_entire_file_from_file :: proc(f: ^File, allocator: runtime.Allocator) -> (d
 			size = int(size64)
 		}
 	} else if serr != .No_Size {
+		err = serr
 		return
 	}