diff options
Diffstat (limited to 'src/PacketHandler.vala')
-rw-r--r-- | src/PacketHandler.vala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/PacketHandler.vala b/src/PacketHandler.vala index 4b1c926..8c6a576 100644 --- a/src/PacketHandler.vala +++ b/src/PacketHandler.vala @@ -37,7 +37,7 @@ namespace Eva { break; } - ostream.write(buffer.buff, buffer.buff.length, null); + ostream.write(((uint8[])buffer.buff)[0:buffer.buff.length], null); } private async void receive() throws Error { @@ -60,10 +60,10 @@ namespace Eva { } uint8[] buffer = new uint8[length]; - size_t received = 0; + ssize_t received = 0; while(received < length) { - size_t ret = yield istream.read_async(&(buffer[received]), length-received, 0, null); + ssize_t ret = yield istream.read_async(buffer[received:length], 0, null); assert(ret > 0); received += ret; |