# wasi.c: fix pread/pwrite · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/5bc95a6fa2af86689c37a87a5899e7e34d6084ee)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 5bc95a6fa2af86689c37a87a5899e7e34d6084ee

Requested commit: 5bc95a6fa2af86689c37a87a5899e7e34d6084ee

Commit: 5bc95a6fa2af86689c37a87a5899e7e34d6084ee

Tree: 69a32d806f4a84a3891d4daa0f7b5f370b677440

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
wasi.c: fix pread/pwrite

When stream is NULL it means reads should read 0 bytes and writes should
fake success with no side effects.

```

## Parents

- [5c6679922d69285ebf807b268d8ca10cf1dbe4c0](https://git.cafe/gitcafe/zig/commit/5c6679922d69285ebf807b268d8ca10cf1dbe4c0?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/5bc95a6fa2af86689c37a87a5899e7e34d6084ee?format=markdown)
