Mock out temp_file.odin stuff

This commit is contained in:
gingerBill
2024-05-14 18:11:50 +01:00
parent 361be301fa
commit 91b7cdaad2
10 changed files with 194 additions and 34 deletions
+3 -3
View File
@@ -282,10 +282,10 @@ _read :: proc(f: ^File, p: []byte) -> (n: i64, err: Error) {
to_read := min(win32.DWORD(length), MAX_RW)
ok: win32.BOOL
if f.impl.kind == .Console {
n, err := read_console(handle, p[total_read:][:to_read])
n, cerr := read_console(handle, p[total_read:][:to_read])
total_read += n
if err != nil {
return i64(total_read), err
if cerr != nil {
return i64(total_read), cerr
}
} else {
ok = win32.ReadFile(handle, &p[total_read], to_read, &single_read_length, nil)