diff options
author | daurnimator <quae@daurnimator.com> | 2017-05-05 11:14:01 +1000 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2017-05-05 13:00:20 +1000 |
commit | b3e2cedff9b47285709d83d9dc53dde5f2ba19e5 (patch) | |
tree | 80cbb62b5978fed1ae8fcefda1eed4ef3e2ce0c3 /src/ldebug.js | |
parent | fb787627c39366de507ee713b9042f33a33395b1 (diff) | |
download | fengari-b3e2cedff9b47285709d83d9dc53dde5f2ba19e5.tar.gz fengari-b3e2cedff9b47285709d83d9dc53dde5f2ba19e5.tar.bz2 fengari-b3e2cedff9b47285709d83d9dc53dde5f2ba19e5.zip |
src/ldebug.js: Fix off by one error when calculating line number
Diffstat (limited to 'src/ldebug.js')
-rw-r--r-- | src/ldebug.js | 2 |
1 files changed, 1 insertions, 1 deletions
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; }; /* |