mirror of
https://github.com/odin-lang/Odin.git
synced 2026-10-11 07:17:48 -04:00
os\os2 windows: fix truncate-clamp op order when determining to_read size
This commit is contained in:
1 parent
6ef2783f03
commit
8d8aaf65aa
1 file changed
+1
-1
@@ -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