Skip to content
Snippets Groups Projects
Commit 5b5c4980 authored by est31's avatar est31 Committed by Craig Robbins
Browse files

Fix minetest.get_craft_recipe function

Previously, calling it resulted in a crash.
parent 0ae75f2a
No related branches found
No related tags found
No related merge requests found
......@@ -393,6 +393,8 @@ int ModApiCraft::l_get_craft_recipe(lua_State *L)
std::vector<CraftDefinition*> recipes = server->cdef()
->getCraftRecipes(output, server, 1);
lua_createtable(L, 1, 0);
if (recipes.empty()) {
lua_pushnil(L);
lua_setfield(L, -2, "items");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment