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

Unified Diff: pkg/fasta/lib/src/quote.dart

Issue 2642763007: Fix bad refactoring in quote.dart. (Closed)
Patch Set: 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/fasta/lib/src/quote.dart
diff --git a/pkg/fasta/lib/src/quote.dart b/pkg/fasta/lib/src/quote.dart
index 6cf6969edc3ca644089b88e5c4779d45c3170223..62f98d702ac95c9ea583fcbbc438d46b26fe2131 100644
--- a/pkg/fasta/lib/src/quote.dart
+++ b/pkg/fasta/lib/src/quote.dart
@@ -218,10 +218,10 @@ String unescapeCodeUnits(List<int> codeUnits) {
}
} else {
// Expect exactly 4 hex digits.
- if (codeUnits.length < i + 4) return error(i, incompleteSequence);
+ if (codeUnits.length <= i + 4) return error(i, incompleteSequence);
code = 0;
for (int j = 0; j < 4; j++) {
- int digit = codeUnits[i];
+ int digit = codeUnits[++i];
if (!isHexDigit(digit)) return error(i, invalidCharacter);
code = (code << 4) + hexDigitValue(digit);
}
« 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