diff --git a/common/lua/program.go b/common/lua/program.go index 11247ee11..a23ce74c5 100644 --- a/common/lua/program.go +++ b/common/lua/program.go @@ -142,7 +142,7 @@ func newSandboxedState() *glua.LState { // Capture preload before package is hidden; require() reads loaders from the registry. module := L.GetGlobal(glua.LoadLibName).(*glua.LTable) preload := module.RawGetString("preload").(*glua.LTable) - loaders := L.NewTable() + loaders := L.CreateTable(1, 0) loaders.RawSetInt(1, L.NewFunction(func(L *glua.LState) int { name := L.CheckString(1) loader := preload.RawGetString(name)