mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-07 16:18:52 +00:00
Fix issue with os.write on *nix with writing nothing
This commit is contained in:
@@ -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