diff options
author | daurnimator <quae@daurnimator.com> | 2017-04-27 15:41:16 +1000 |
---|---|---|
committer | Benoit Giannangeli <giann008@gmail.com> | 2017-04-28 14:15:58 +0200 |
commit | 4cd7e4062219ccffbbc9e397e1ab599c26a3ae76 (patch) | |
tree | 9902acf8475e45cf7313bccbdf35eb54a4c51a93 /src/ltm.js | |
parent | 6527126b549870eb1767dfc74e41d8e8eb7b62b5 (diff) | |
download | fengari-4cd7e4062219ccffbbc9e397e1ab599c26a3ae76.tar.gz fengari-4cd7e4062219ccffbbc9e397e1ab599c26a3ae76.tar.bz2 fengari-4cd7e4062219ccffbbc9e397e1ab599c26a3ae76.zip |
Userdata needs to be boxed so it can have uservalue+metatable
metatable should not be on the TValue
Diffstat (limited to 'src/ltm.js')
-rw-r--r-- | src/ltm.js | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -70,7 +70,7 @@ const luaT_init = function(L) { const luaT_objtypename = function(L, o) { let mt; if ((o.ttistable() && (mt = o.metatable) !== null) || - (o.ttisfulluserdata() && (mt = o.metatable) !== null)) { + (o.ttisfulluserdata() && (mt = o.value.metatable) !== null)) { let name = lobject.table_index(mt, defs.to_luastring('__name', true)); if (name.ttisstring()) return name.value; |