| Index: runtime/bin/gen_snapshot.cc
|
| diff --git a/runtime/bin/gen_snapshot.cc b/runtime/bin/gen_snapshot.cc
|
| index 0612f1588805abf1c6d2f03c912645d98d9253c1..9f707433bdc931d37e6bae0500c5cb61f2bbb118 100644
|
| --- a/runtime/bin/gen_snapshot.cc
|
| +++ b/runtime/bin/gen_snapshot.cc
|
| @@ -143,8 +143,8 @@ static int ParseArguments(int argc,
|
| static void WriteSnapshotFile(const uint8_t* buffer, const intptr_t size) {
|
| File* file = File::Open(snapshot_filename, File::kWriteTruncate);
|
| ASSERT(file != NULL);
|
| - for (intptr_t i = 0; i < size; i++) {
|
| - file->WriteByte(buffer[i]);
|
| + if (!file->WriteFully(buffer, size)) {
|
| + Log::PrintErr("Error: Failed to write full snapshot.\n\n");
|
| }
|
| delete file;
|
| }
|
|
|