summaryrefslogtreecommitdiff
path: root/src/lstate.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-02-17 23:17:35 +0100
committerBenoit Giannangeli <giann008@gmail.com>2017-02-17 23:17:35 +0100
commitde7046f938975dbdcd6cfaba6f535dec53dfc263 (patch)
treea68589e7ff126c8f62cf20773b6b531c5b833f59 /src/lstate.js
parent06ec7904c37b897b2e87f4321198926ff22da1d9 (diff)
downloadfengari-de7046f938975dbdcd6cfaba6f535dec53dfc263.tar.gz
fengari-de7046f938975dbdcd6cfaba6f535dec53dfc263.tar.bz2
fengari-de7046f938975dbdcd6cfaba6f535dec53dfc263.zip
Load std lib, can call print
Diffstat (limited to 'src/lstate.js')
-rw-r--r--src/lstate.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lstate.js b/src/lstate.js
index 54e7ac7..30e4b15 100644
--- a/src/lstate.js
+++ b/src/lstate.js
@@ -96,8 +96,8 @@ const stack_init = function(L1, L) {
const init_registry = function(L, g) {
let registry = new Table();
g.l_registry = registry;
- registry.value.array[lua.LUA_RIDX_MAINTHREAD] = L;
- registry.value.array[lua.LUA_RIDX_GLOBALS] = new Table();
+ registry.value.array[lua.LUA_RIDX_MAINTHREAD - 1] = L;
+ registry.value.array[lua.LUA_RIDX_GLOBALS - 1] = new Table();
};
/*