Commit 26696ced authored by mercury233's avatar mercury233 Committed by GitHub

refuse Group.SelectWithSumEqual with more than 127 max (#473)

parent 1c7549e8
......@@ -441,6 +441,8 @@ int32 scriptlib::group_select_with_sum_equal(lua_State *L) {
min = 0;
if(max < min)
max = min;
if(max > 127)
return luaL_error(L, "Parameter \"max\" exceeded 127.");
int32 extraargs = lua_gettop(L) - 6;
pduel->game_field->core.select_cards.assign(pgroup->container.begin(), pgroup->container.end());
for(auto& pcard : pduel->game_field->core.must_select_cards) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment