diff options
| author | Mel <einebeere@gmail.com> | 2022-08-20 02:24:20 +0000 |
|---|---|---|
| committer | Mel <einebeere@gmail.com> | 2022-08-20 02:24:55 +0000 |
| commit | 24183cd5363b96d83292df17d44fa79d8b47a89f (patch) | |
| tree | 5fdf4f69f481eddfd77c50838e2fe08a76279384 /pkg/lang | |
| parent | 18c6d49cc9982ad4362e82730812e1134478ea64 (diff) | |
| download | jinx-24183cd5363b96d83292df17d44fa79d8b47a89f.tar.zst jinx-24183cd5363b96d83292df17d44fa79d8b47a89f.zip | |
Improved and more versatile RangeMap
Diffstat (limited to 'pkg/lang')
| -rw-r--r-- | pkg/lang/vm/code/debug.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/lang/vm/code/debug.go b/pkg/lang/vm/code/debug.go index b96c834..ebf0ea1 100644 --- a/pkg/lang/vm/code/debug.go +++ b/pkg/lang/vm/code/debug.go @@ -19,8 +19,8 @@ func (di *DebugInfo) File() string { } func (di *DebugInfo) PCToLine(pc int) int { - line, ok := di.pcToLine.Get(pc) - if !ok { + line := di.pcToLine.Get(pc) + if line == nil { return -1 } return *line |
