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

Unified Diff: runtime/bin/vmservice/loader.dart

Issue 1269643002: - Fix logic bug when skipping comments. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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/bin/vmservice/loader.dart
diff --git a/runtime/bin/vmservice/loader.dart b/runtime/bin/vmservice/loader.dart
index 83e57e439726ee4782b8556291527e87ecd11b16..e24b0204f161de1be92de8429fc15264c9ac7457 100644
--- a/runtime/bin/vmservice/loader.dart
+++ b/runtime/bin/vmservice/loader.dart
@@ -170,6 +170,8 @@ _parsePackagesFile(SendPort sp,
// Scan to the end of the line or data.
while (index < len) {
char = data[index++];
+ // If we have not reached the separator yet, determine whether we are
+ // scanning legal package name characters.
if (separator == -1) {
if ((char == _COLON)) {
// The first colon on a line is the separator between package name and
@@ -183,8 +185,9 @@ _parsePackagesFile(SendPort sp,
(char < _SPACE) || (char > _DEL) ||
_invalidPackageNameChars[char - _SPACE];
}
- } else if ((char == _CR) || (char == _LF)) {
- // Identify end of line.
+ }
+ // Identify end of line.
+ if ((char == _CR) || (char == _LF)) {
end = index - 1;
break;
}
« 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