Commit 0799fec5 authored by mercury233's avatar mercury233 Committed by GitHub

fix check negative LP cost (#452)

parent 6abb008e
......@@ -1431,7 +1431,11 @@ int32 scriptlib::duel_check_lp_cost(lua_State *L) {
uint32 playerid = (uint32)lua_tointeger(L, 1);
if(playerid != 0 && playerid != 1)
return 0;
uint32 cost = (uint32)lua_tointeger(L, 2);
int32 cost = (int32)lua_tointeger(L, 2);
if(cost <= 0) {
lua_pushboolean(L, 0);
return 1;
}
duel* pduel = interpreter::get_duel_info(L);
uint32 must_pay = FALSE;
if(lua_gettop(L) > 2)
......
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