Index: runtime/vm/object.cc |
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc |
index 0fda4e48c5fdea78e20feddb11eb607bde8ba93b..a1a536c8f721bb9460f4d1af4f4f65cd2d2b956f 100644 |
--- a/runtime/vm/object.cc |
+++ b/runtime/vm/object.cc |
@@ -8427,6 +8427,12 @@ RawString* Script::GetSnippet(intptr_t from_line, |
} |
while (scan_position != length) { |
+ if (snippet_start == -1) { |
+ if ((line == from_line) && (column == from_column)) { |
+ snippet_start = scan_position; |
+ } |
+ } |
+ |
char c = src.CharAt(scan_position); |
if (c == '\n') { |
line++; |
@@ -8442,11 +8448,7 @@ RawString* Script::GetSnippet(intptr_t from_line, |
scan_position++; |
column++; |
- if (snippet_start == -1) { |
- if ((line == from_line) && (column == from_column)) { |
- snippet_start = scan_position; |
- } |
- } else if ((line == to_line) && (column == to_column)) { |
+ if ((line == to_line) && (column == to_column)) { |
snippet_end = scan_position; |
break; |
} |