Commit 3b873526 authored by salix5's avatar salix5

change SIZE_RETURN_VALUE to 512

parent 976ff898
......@@ -31,7 +31,7 @@ typedef signed char int8;
#define TRUE 1
#define FALSE 0
#define SIZE_MESSAGE_BUFFER 0x2000
#define SIZE_RETURN_VALUE 128
#define SIZE_RETURN_VALUE 512
#define PROCESSOR_BUFFER_LEN 0x0fffffff
#define PROCESSOR_FLAG 0xf0000000
......
......@@ -494,8 +494,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.");
if(max > UINT8_MAX)
return luaL_error(L, "Parameter \"max\" exceeded 255.");
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) {
......
......@@ -244,8 +244,6 @@ int32 field::select_card(uint16 step, uint8 playerid, uint8 cancelable, uint8 mi
std::sort(core.select_cards.begin(), core.select_cards.end(), card::card_operation_sort);
if (core.select_cards.size() > UINT8_MAX)
core.select_cards.resize(UINT8_MAX);
if (max > SIZE_RETURN_VALUE - 1)
max = SIZE_RETURN_VALUE - 1;
if(max > core.select_cards.size())
max = (uint8)core.select_cards.size();
if(min > max)
......
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