Correct EOF value

This commit is contained in:
gingerBill
2024-08-04 13:20:33 +01:00
parent cf5ec25873
commit 0c5b645dde
3 changed files with 2 additions and 7 deletions
+1 -1
View File
@@ -173,7 +173,7 @@ read :: proc(fd: Handle, data: []byte) -> (total_read: int, err: Error) {
// Successful read can mean two things, including EOF, see:
// https://learn.microsoft.com/en-us/windows/win32/fileio/testing-for-the-end-of-a-file
if bytes_read == 0 {
return 0, ERROR_HANDLE_EOF
return 0, .EOF
} else {
return int(bytes_read), nil
}