Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(853)

Unified Diff: runtime/bin/file.cc

Issue 2615673002: Make RandomAccessFile.writeFrom use the correct starting offset (Closed)
Patch Set: Add test Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/standalone/io/file_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/file.cc
diff --git a/runtime/bin/file.cc b/runtime/bin/file.cc
index ee3255a0213ec7cf92463837420f813a0626e977..1abd906d31322cd29fd30c60862fd48de34e2443 100644
--- a/runtime/bin/file.cc
+++ b/runtime/bin/file.cc
@@ -256,7 +256,8 @@ void FUNCTION_NAME(File_WriteFrom)(Dart_NativeArguments args) {
ASSERT(buffer != NULL);
// Write all the data out into the file.
- bool success = file->WriteFully(buffer, length);
+ char* byte_buffer = reinterpret_cast<char*>(buffer);
+ bool success = file->WriteFully(byte_buffer + start, length);
// Release the direct pointer acquired above.
result = Dart_TypedDataReleaseData(buffer_obj);
« no previous file with comments | « no previous file | tests/standalone/io/file_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698