瀏覽代碼

* fixed WASI bug in do_read, where the result of the __wasi_fd_read syscall function was ignored

Nikolay Nikolov 3 年之前
父節點
當前提交
09e61201d2
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      rtl/wasi/sysfile.inc

+ 1 - 1
rtl/wasi/sysfile.inc

@@ -101,7 +101,7 @@ begin
   repeat
     our_iov.buf:=Addr;
     our_iov.buf_len:=Len;
-    __wasi_fd_read(Handle,@our_iov,1,@our_nread);
+    res:=__wasi_fd_read(Handle,@our_iov,1,@our_nread);
   until (res=__WASI_ERRNO_SUCCESS) or ((res<>__WASI_ERRNO_INTR) and (res<>__WASI_ERRNO_AGAIN));
   if res=__WASI_ERRNO_SUCCESS then
     begin