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/lstrlib.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lstrlib.js') diff --git a/src/lstrlib.js b/src/lstrlib.js index 471187b..e163485 100644 --- a/src/lstrlib.js +++ b/src/lstrlib.js @@ -1372,7 +1372,7 @@ const createmetatable = function(L) { lapi.lua_setmetatable(L, -2); /* set table as metatable for strings */ lapi.lua_pop(L, 1); /* pop dummy string */ lapi.lua_pushvalue(L, -2); /* get string library */ - lapi.lua_setfield(L, -2, "__index"); /* metatable.__index = string */ + lapi.lua_setfield(L, -2, lua.to_luastring("__index")); /* metatable.__index = string */ lapi.lua_pop(L, 1); /* pop metatable */ }; -- cgit v1.2.3-54-g00ecf