From 86a09b63a6a316ee0855ce1d5307ea89f0b6f1ec Mon Sep 17 00:00:00 2001 From: Benoit Giannangeli Date: Sun, 5 Feb 2017 09:12:54 +0100 Subject: Fixed bad use of L.top --- src/lstate.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/lstate.js') diff --git a/src/lstate.js b/src/lstate.js index f9dbf8e..bf49b42 100644 --- a/src/lstate.js +++ b/src/lstate.js @@ -7,13 +7,12 @@ class CallInfo { constructor(func, top, base, previous, next) { this.func = func; this.top = top; - this.base = base; this.previous = previous; this.next = next; this.pcOff = 0; this.u = { l: { - base: null, + base: base, savedpc: [] } }; @@ -25,10 +24,8 @@ class lua_State { constructor(cl) { this.top = 1; - this.ci = [ - new CallInfo(cl, 1, 1, null, null) - ]; - this.ci[0].u.l.savedpc = cl.p.code; + this.ci = new CallInfo(cl, 1, 1, null, null); + this.ci.u.l.savedpc = cl.p.code; this.ciOff = 0; this.stack = [ cl -- cgit v1.2.3-54-g00ecf