Fix issue with os.write on *nix with writing nothing

This commit is contained in:
gingerBill committed 2019-11-24 10:08:08 +00:00
1 parent 45d844f9d2
commit 902d313c6a
2 files changed
+4 -1

No files matched your search

+1 -1
View File
@@ -170,7 +170,7 @@ write :: proc(fd: Handle, data: []u8) -> (int, Errno) {
assert(fd != -1);
if len(data) == 0 {
return 0, 1;
return 0, 0;
}
bytes_written := _unix_write(fd, &data[0], len(data));
if(bytes_written == -1) {