summaryrefslogtreecommitdiff
path: root/src/ltm.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-04-27 15:41:16 +1000
committerBenoit Giannangeli <giann008@gmail.com>2017-04-28 14:15:58 +0200
commit4cd7e4062219ccffbbc9e397e1ab599c26a3ae76 (patch)
tree9902acf8475e45cf7313bccbdf35eb54a4c51a93 /src/ltm.js
parent6527126b549870eb1767dfc74e41d8e8eb7b62b5 (diff)
downloadfengari-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.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ltm.js b/src/ltm.js
index 8687eb0..c94d8f1 100644
--- a/src/ltm.js
+++ b/src/ltm.js
@@ -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;