summaryrefslogtreecommitdiff
path: root/src/lstate.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-02-05 09:12:54 +0100
committerBenoit Giannangeli <giann008@gmail.com>2017-02-05 09:12:54 +0100
commit86a09b63a6a316ee0855ce1d5307ea89f0b6f1ec (patch)
tree9f94608831b94a8a287c3e5edbe1e74d397bb241 /src/lstate.js
parent18b89ee8e1059a21f8d5e3a52c2e256b7dea79cb (diff)
downloadfengari-86a09b63a6a316ee0855ce1d5307ea89f0b6f1ec.tar.gz
fengari-86a09b63a6a316ee0855ce1d5307ea89f0b6f1ec.tar.bz2
fengari-86a09b63a6a316ee0855ce1d5307ea89f0b6f1ec.zip
Fixed bad use of L.top
Diffstat (limited to 'src/lstate.js')
-rw-r--r--src/lstate.js9
1 files changed, 3 insertions, 6 deletions
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