mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-04 22:58:46 +00:00
os2: do read_entire_file in parts if the file size is 0
This commit is contained in:
@@ -130,7 +130,7 @@ read_entire_file_from_file :: proc(f: ^File, allocator: runtime.Allocator) -> (d
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if has_size {
|
if has_size && size > 0 {
|
||||||
total: int
|
total: int
|
||||||
data = make([]byte, size, allocator) or_return
|
data = make([]byte, size, allocator) or_return
|
||||||
for total < len(data) {
|
for total < len(data) {
|
||||||
|
|||||||
Reference in New Issue
Block a user