Index: runtime/bin/socket_patch.dart |
diff --git a/runtime/bin/socket_patch.dart b/runtime/bin/socket_patch.dart |
index 0316652c4b3ccc2ae28ef7e13a582a0eae5fb8ac..af0da10a329fb41daf00ad2f2590e5005bbc37a0 100644 |
--- a/runtime/bin/socket_patch.dart |
+++ b/runtime/bin/socket_patch.dart |
@@ -175,10 +175,10 @@ class _NativeSocket extends NativeFieldWrapperClass1 { |
} |
if (isClosed) return 0; |
if (bytes == 0) return 0; |
- _BufferAndOffset bufferAndOffset = |
- _ensureFastAndSerializableBuffer(buffer, offset, bytes); |
+ _BufferAndStart bufferAndStart = |
+ _ensureFastAndSerializableBuffer(buffer, offset, offset + bytes); |
var result = |
- nativeWrite(bufferAndOffset.buffer, bufferAndOffset.offset, bytes); |
+ nativeWrite(bufferAndStart.buffer, bufferAndStart.start, bytes); |
if (result is OSError) { |
reportError(result, "Write failed"); |
result = 0; |