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

Unified Diff: pkg/yaml/lib/src/scanner.dart

Issue 801573003: Fix a crashing yaml bug when parsing block scalars. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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 | « pkg/yaml/CHANGELOG.md ('k') | pkg/yaml/pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/yaml/lib/src/scanner.dart
diff --git a/pkg/yaml/lib/src/scanner.dart b/pkg/yaml/lib/src/scanner.dart
index 6c702c80e0e7986126a5505e324bbfa1c237d275..e1b578ebebb2b681924e0cdd2eeefdb9126da90d 100644
--- a/pkg/yaml/lib/src/scanner.dart
+++ b/pkg/yaml/lib/src/scanner.dart
@@ -1156,7 +1156,7 @@ class Scanner {
var leadingBreak = '';
var leadingBlank = false;
var trailingBlank = false;
- var end = _scanner.position;
+ var end = _scanner.state;
while (_scanner.column == indent && !_scanner.isDone) {
// Check for a document indicator. libyaml doesn't do this, but the spec
// mandates it. See example 9.5:
@@ -1189,7 +1189,7 @@ class Scanner {
_scanner.readChar();
}
buffer.write(_scanner.substring(startPosition));
- end = _scanner.position;
+ end = _scanner.state;
// libyaml always reads a line here, but this breaks on block scalars at
// the end of the document that end without newlines. See example 8.1:
« no previous file with comments | « pkg/yaml/CHANGELOG.md ('k') | pkg/yaml/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698