Fix issue with os.write on *nix with writing nothing
This commit is contained in:
1 parent
45d844f9d2
commit
902d313c6a
2 files changed
+4
-1
No files matched your search
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user