about summary refs log tree commit diff
path: root/pkg/lang/vm
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2022-08-20 02:24:20 +0000
committerMel <einebeere@gmail.com>2022-08-20 02:24:55 +0000
commit24183cd5363b96d83292df17d44fa79d8b47a89f (patch)
tree5fdf4f69f481eddfd77c50838e2fe08a76279384 /pkg/lang/vm
parent18c6d49cc9982ad4362e82730812e1134478ea64 (diff)
downloadjinx-24183cd5363b96d83292df17d44fa79d8b47a89f.tar.zst
jinx-24183cd5363b96d83292df17d44fa79d8b47a89f.zip
Improved and more versatile RangeMap
Diffstat (limited to 'pkg/lang/vm')
-rw-r--r--pkg/lang/vm/code/debug.go4
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