Skip to content

Commit fa1096e

Browse files
committedJul 25, 2015
Fix minetest.get_(all)_craft_recipe(s) regression
Since 03e0dd3 the calls didn't return an output count for the recipes.
1 parent 4e6971e commit fa1096e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

Diff for: ‎src/script/lua_api/l_craft.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ int ModApiCraft::l_get_craft_result(lua_State *L)
332332
}
333333

334334

335-
void push_craft_recipe(lua_State *L, IGameDef *gdef,
335+
static void push_craft_recipe(lua_State *L, IGameDef *gdef,
336336
const CraftDefinition *recipe,
337337
const CraftOutput &tmpout)
338338
{
@@ -363,11 +363,11 @@ void push_craft_recipe(lua_State *L, IGameDef *gdef,
363363
lua_pushstring(L, "unknown");
364364
}
365365
lua_setfield(L, -2, "type");
366-
lua_pushstring(L, tmpout.item.c_str());
366+
lua_pushstring(L, output.item.c_str());
367367
lua_setfield(L, -2, "output");
368368
}
369369

370-
void push_craft_recipes(lua_State *L, IGameDef *gdef,
370+
static void push_craft_recipes(lua_State *L, IGameDef *gdef,
371371
const std::vector<CraftDefinition*> &recipes,
372372
const CraftOutput &output)
373373
{

0 commit comments

Comments
 (0)