From a0fa83dc9c170542630dbc83d1732d3e7a6313e9 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Sat, 6 Jan 2018 19:32:31 +1100 Subject: Expose lua.luastring_of to construct a lua 'string' from raw byte values --- src/lutf8lib.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lutf8lib.js') diff --git a/src/lutf8lib.js b/src/lutf8lib.js index f581a9e..722d9f1 100644 --- a/src/lutf8lib.js +++ b/src/lutf8lib.js @@ -216,7 +216,7 @@ const funcs = { }; /* pattern to match a single UTF-8 character */ -const UTF8PATT = Uint8Array.of(91, 0, 45, 127, 194, 45, 244, 93, 91, 128, 45, 191, 93, 42); +const UTF8PATT = lua.luastring_of(91, 0, 45, 127, 194, 45, 244, 93, 91, 128, 45, 191, 93, 42); const luaopen_utf8 = function(L) { lauxlib.luaL_newlib(L, funcs); -- cgit v1.2.3-54-g00ecf