From b3e2cedff9b47285709d83d9dc53dde5f2ba19e5 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Fri, 5 May 2017 11:14:01 +1000 Subject: src/ldebug.js: Fix off by one error when calculating line number --- src/ldebug.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ldebug.js') diff --git a/src/ldebug.js b/src/ldebug.js index aed41e2..18a36a6 100644 --- a/src/ldebug.js +++ b/src/ldebug.js @@ -18,7 +18,7 @@ const CT = defs.constant_types; const TS = defs.thread_status; const currentline = function(ci) { - return ci.func.value.p.lineinfo ? ci.func.value.p.lineinfo[ci.pcOff] : -1; + return ci.func.value.p.lineinfo ? ci.func.value.p.lineinfo[ci.pcOff-1] : -1; }; /* -- cgit v1.2.3-54-g00ecf