From 818a86ae8e4afe75f0521967125cdf1cca6b26f0 Mon Sep 17 00:00:00 2001 From: Benoit Giannangeli Date: Fri, 5 May 2017 15:02:32 +0200 Subject: Added missing parameter to luaL_loadbufferx in luaB_load --- src/lbaselib.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/lbaselib.js b/src/lbaselib.js index 5e3fff6..d1d930a 100644 --- a/src/lbaselib.js +++ b/src/lbaselib.js @@ -297,7 +297,7 @@ const luaB_load = function(L) { let status; if (s !== null) { /* loading a string? */ let chunkname = lauxlib.luaL_optstring(L, 2, s); - status = lauxlib.luaL_loadbufferx(L, s, chunkname, mode); + status = lauxlib.luaL_loadbufferx(L, s, s.length, chunkname, mode); } else { /* loading from a reader function */ let chunkname = lauxlib.luaL_optstring(L, 2, lua.to_luastring("=(load)", true)); lauxlib.luaL_checktype(L, 1, lua.LUA_TFUNCTION); -- cgit v1.2.3-70-g09d2