From 589df5f4e66bf954ded619c6f7bb713ae82514d6 Mon Sep 17 00:00:00 2001
From: daurnimator <quae@daurnimator.com>
Date: Thu, 18 May 2017 13:25:33 +1000
Subject: src/ltm.js: luaH_getstr takes a TString, not a raw string

---
 src/ltm.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/ltm.js b/src/ltm.js
index e075e56..3e24c9c 100644
--- a/src/ltm.js
+++ b/src/ltm.js
@@ -95,11 +95,12 @@ const luaT_init = function(L) {
 ** Return the name of the type of an object. For tables and userdata
 ** with metatable, use their '__name' metafield, if present.
 */
+const __name = defs.to_luastring('__name', true);
 const luaT_objtypename = function(L, o) {
     let mt;
     if ((o.ttistable() && (mt = o.value.metatable) !== null) ||
         (o.ttisfulluserdata() && (mt = o.value.metatable) !== null)) {
-        let name = ltable.luaH_getstr(mt, defs.to_luastring('__name', true));
+        let name = ltable.luaH_getstr(mt, lstring.luaS_bless(L, __name));
         if (name.ttisstring())
             return name.svalue();
     }
-- 
cgit v1.2.3-70-g09d2