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

Unified Diff: runtime/vm/dart_api_impl.cc

Issue 1368783002: Fix off by one error in trace-event output (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_api_impl.cc
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index fd5061b178af360ff5941f7e25163ac14b611d9c..8eadaedec9efb67859d1fc402bd66c82b351e6d8 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -5732,11 +5732,11 @@ static void StreamToConsumer(Dart_StreamConsumer consumer,
user_data);
// Stream out data. Skipping the array characters.
+ // Replace array close with '\0'.
+ output[output_length - 2] = '\0';
intptr_t cursor = 1;
output_length -= 1;
intptr_t remaining = output_length - 1;
- // Replace array close with '\0'.
- output[output_length - 2] = '\0';
while (remaining >= kDataSize) {
consumer(Dart_StreamConsumer_kData,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698