mirror of
https://github.com/odin-lang/Odin.git
synced 2026-04-19 04:50:29 +00:00
Fix reading from /sys/ pseudo fx
This commit is contained in:
@@ -63,8 +63,8 @@ read_at_least :: proc(fd: Handle, buf: []byte, min: int) -> (n: int, err: Errno)
|
||||
if len(buf) < min {
|
||||
return 0, -1
|
||||
}
|
||||
for n < min && err == 0 {
|
||||
nn: int
|
||||
nn := max(int)
|
||||
for nn > 0 && n < min && err == 0 {
|
||||
nn, err = read(fd, buf[n:])
|
||||
n += nn
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user