Fix broken cases of Seek usage in _file_stream_proc

Handles `EINVAL`, among other fixes.
This commit is contained in:
Feoramund
2024-08-28 19:53:20 +02:00
committed by Laytan
parent e83b982afe
commit 1ced76cdd1
4 changed files with 15 additions and 0 deletions
+2
View File
@@ -192,6 +192,8 @@ seek :: proc(fd: Handle, offset: i64, whence: int) -> (i64, Error) {
case 0: w = win32.FILE_BEGIN
case 1: w = win32.FILE_CURRENT
case 2: w = win32.FILE_END
case:
return 0, .Invalid_Whence
}
hi := i32(offset>>32)
lo := i32(offset)