diff --git a/tool/net/redbean.c b/tool/net/redbean.c index 4f2b5af86..e13e39887 100644 --- a/tool/net/redbean.c +++ b/tool/net/redbean.c @@ -3252,7 +3252,7 @@ static const char *LuaCheckHost(lua_State *L, int idx, size_t *hostlen) { } static void OnlyCallFromInitLua(const char *api) { - if (!isinitialized) { + if (isinitialized) { luaL_error(L, "%s() should be called from the global scope of .init.lua", api); unreachable;