os/os2: fix stale errors on windows when reading from console

This commit is contained in:
laytan
2025-12-20 18:31:48 +01:00
parent 60130b87b0
commit ca1bb09e97

View File

@@ -378,6 +378,7 @@ _read_internal :: proc(f: ^File_Impl, p: []byte) -> (n: i64, err: Error) {
if cerr != nil {
return i64(total_read), cerr
}
ok = true
} else {
ok = win32.ReadFile(handle, &p[total_read], to_read, &single_read_length, nil)
}