Index: utils/tests/string_encoding/benchmark_runner.dart |
diff --git a/utils/tests/string_encoding/benchmark_runner.dart b/utils/tests/string_encoding/benchmark_runner.dart |
index 0463030308a03a0f6fb2b6333d0d1642ffd7f6d8..de90cf5b43e21006d1a8506102f4066bf6e4344e 100644 |
--- a/utils/tests/string_encoding/benchmark_runner.dart |
+++ b/utils/tests/string_encoding/benchmark_runner.dart |
@@ -177,8 +177,9 @@ class TestReport { |
String _rightAlign(String s, int width) { |
List<int> outCodes = []; |
outCodes.insertRange(0, width, spaceChar); |
- outCodes.setRange(Math.max(0, width - s.length), Math.min(width, s.length), |
- s.codeUnits); |
+ int fromIndex = Math.max(0, width - s.length); |
+ int length = Math.min(width, s.length); |
+ outCodes.setRange(fromIndex, fromIndex + length, s.codeUnits); |
return new String.fromCharCodes(outCodes); |
} |