summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-05-21 22:31:03 +1000
committerdaurnimator <quae@daurnimator.com>2017-05-21 23:53:49 +1000
commitf999c75b3ab32f0011ed99fd8c65465c0d239c12 (patch)
tree1238e6b3534cc88cbdf476a11983d21ea77aeba5
parent04d5f8bada19aec5ae25038fc9b854f4614b974f (diff)
downloadfengari-f999c75b3ab32f0011ed99fd8c65465c0d239c12.tar.gz
fengari-f999c75b3ab32f0011ed99fd8c65465c0d239c12.tar.bz2
fengari-f999c75b3ab32f0011ed99fd8c65465c0d239c12.zip
src/ldebug.js: compare same string types
-rw-r--r--src/ldebug.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ldebug.js b/src/ldebug.js
index 13b9da7..47f32f6 100644
--- a/src/ldebug.js
+++ b/src/ldebug.js
@@ -399,7 +399,7 @@ const getobjname = function(p, lastpc, reg) {
let t = i.B; /* table index */
let vn = op === 'OP_GETTABLE' ? lfunc.luaF_getlocalname(p, t + 1, pc) : upvalname(p, t);
r.name = kname(p, pc, k).name;
- r.funcname = vn && vn === "_ENV" ? defs.to_luastring("global", true) : defs.to_luastring("field", true);
+ r.funcname = vn && defs.to_jsstring(vn) === "_ENV" ? defs.to_luastring("global", true) : defs.to_luastring("field", true);
return r;
}
case 'OP_GETUPVAL': {