Merge pull request #2164 from colrdavidson/fix-osx-read

terminate read if we read EOF
This commit is contained in:
Jeroen van Rijn authored and GitHub committed 2022-10-31 14:44:40 +01:00
commit f8228e305a
1 file changed
+3
+3
View File
@@ -404,6 +404,9 @@ read :: proc(fd: Handle, data: []u8) -> (int, Errno) {
if bytes_read == -1 {
return bytes_read_total, 1
}
if bytes_read == 0 {
break
}
bytes_read_total += bytes_read
}