Skip to content

Commit

Permalink
Fix parameters count check in luaPlayerAddItem (#3831)
Browse files Browse the repository at this point in the history
  • Loading branch information
marmichalski authored and DSpeichert committed May 9, 2022
1 parent d813c1c commit b3b5071
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/luascript.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9239,7 +9239,7 @@ int LuaScriptInterface::luaPlayerAddItem(lua_State* L)

int32_t itemCount = 1;
int parameters = lua_gettop(L);
if (parameters >= 4) {
if (parameters >= 5) {
itemCount = std::max<int32_t>(1, count);
} else if (it.hasSubType()) {
if (it.stackable) {
Expand Down

0 comments on commit b3b5071

Please sign in to comment.