Commit 670de59f authored by Chen Bill's avatar Chen Bill

fix Group.RemoveCard

parent 9a2f476a
......@@ -88,6 +88,8 @@ int32 scriptlib::group_remove_card(lua_State *L) {
group* pgroup = *(group**) lua_touserdata(L, 1);
card* pcard = *(card**) lua_touserdata(L, 2);
if (pgroup->is_readonly != 1) {
if (pgroup->it != pgroup->container.end() && *pgroup->it == pcard)
++pgroup->it;
pgroup->container.erase(pcard);
}
return 0;
......
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