From 24183cd5363b96d83292df17d44fa79d8b47a89f Mon Sep 17 00:00:00 2001 From: Mel Date: Sat, 20 Aug 2022 02:24:20 +0000 Subject: Improved and more versatile RangeMap --- pkg/lang/vm/code/debug.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkg/lang') 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 -- cgit 1.4.1