mirror of
https://github.com/odin-lang/Odin.git
synced 2026-02-12 06:18:39 +00:00
os\os2 windows: fix truncate-clamp op order when determining to_read size
This commit is contained in:
@@ -377,7 +377,7 @@ _read_internal :: proc(f: ^File_Impl, p: []byte) -> (n: i64, err: Error) {
|
||||
sync.shared_guard(&f.rw_mutex) // multiple readers
|
||||
|
||||
if sync.guard(&f.p_mutex) {
|
||||
to_read := min(win32.DWORD(length), MAX_RW)
|
||||
to_read := win32.DWORD(min(length, MAX_RW))
|
||||
switch f.kind {
|
||||
case .Console:
|
||||
// NOTE(laytan): at least for now, just use ReadFile, it seems to work fine,
|
||||
|
||||
Reference in New Issue
Block a user