| Index: lib/source_map_stack_trace.dart
|
| diff --git a/lib/source_map_stack_trace.dart b/lib/source_map_stack_trace.dart
|
| index a5a22b31727c9ede2ff51b1054f05159153f1586..41072e4fa70cbedadd697e055f115dddfc89ffa6 100644
|
| --- a/lib/source_map_stack_trace.dart
|
| +++ b/lib/source_map_stack_trace.dart
|
| @@ -51,7 +51,10 @@ StackTrace mapStackTrace(Mapping sourceMap, StackTrace stackTrace,
|
|
|
| // If there's no column, try using the first column of the line.
|
| var column = frame.column == null ? 0 : frame.column;
|
| - var span = sourceMap.spanFor(frame.line, column);
|
| +
|
| + // Subtract 1 because stack traces use 1-indexed lines and columns and
|
| + // source maps uses 0-indexed.
|
| + var span = sourceMap.spanFor(frame.line - 1, column - 1);
|
|
|
| // If we can't find a source span, ignore the frame. It's probably something
|
| // internal that the user doesn't care about.
|
|
|