From 456ab7b69f88859683c60cc2261e70d6dbadd8e8 Mon Sep 17 00:00:00 2001 From: Benoit Giannangeli Date: Wed, 29 Mar 2017 14:39:57 +0200 Subject: 8-bit string internally tests Lexing/Parsing is done on byte rather than js strings --- src/ldebug.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ldebug.js') diff --git a/src/ldebug.js b/src/ldebug.js index 507e764..0fba4cb 100644 --- a/src/ldebug.js +++ b/src/ldebug.js @@ -431,7 +431,7 @@ const varinfo = function(L, o) { kind = getobjname(ci.func.p, ci.pcOff, stkid - ci.u.l.base); } - return lua.to_luastring(kind ? ` (${lobject.jsstring(kind.funcname)} '${lobject.jsstring(kind.name)}')` : ``); + return lua.to_luastring(kind ? ` (${lobject.jsstring(kind.funcname)} '${kind.name.jsstring()}')` : ``); }; const luaG_typeerror = function(L, o, op) { @@ -457,7 +457,7 @@ const luaG_opinterror = function(L, p1, p2, msg) { const luaG_ordererror = function(L, p1, p2) { let t1 = ltm.luaT_objtypename(L, p1); let t2 = ltm.luaT_objtypename(L, p2); - if (t1 === t2) + if (t1.join() === t2.join()) luaG_runerror(L, lua.to_luastring(`attempt to compare two ${lobject.jsstring(t1)} values`)); else luaG_runerror(L, lua.to_luastring(`attempt to compare ${lobject.jsstring(t1)} with ${lobject.jsstring(t2)}`)); -- cgit v1.2.3-54-g00ecf