From b4967d6e0c329a7abff23dc13d5defb82c242fe3 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Sat, 3 Jan 2026 00:02:30 +1100 Subject: [PATCH] src/lzio.js: allow passing plain js string to e.g. lua_load https://github.com/fengari-lua/fengari/issues/178#issuecomment-636470228 --- src/lzio.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lzio.js b/src/lzio.js index b9081a7a..293e50a9 100644 --- a/src/lzio.js +++ b/src/lzio.js @@ -50,7 +50,7 @@ const luaZ_fill = function(z) { let buff = z.reader(z.L, z.data); if (buff === null) return EOZ; - lua_assert(buff instanceof Uint8Array, "Should only load binary of array of bytes"); + buff = from_userstring(buff); let size = buff.length; if (size === 0) return EOZ;