Commit 266f0c9d authored by nanahira's avatar nanahira

Merge branch 'server' of ../versions/ygopro-mc into server

parents 85516a95 1a87ac20
...@@ -404,7 +404,12 @@ void SingleDuel::UpdateDeck(DuelPlayer* dp, unsigned char* pdata, int len) { ...@@ -404,7 +404,12 @@ void SingleDuel::UpdateDeck(DuelPlayer* dp, unsigned char* pdata, int len) {
valid = false; valid = false;
else if (sidec < 0 || sidec > SIDEC_MAX) else if (sidec < 0 || sidec > SIDEC_MAX)
valid = false; valid = false;
else if (deck_size != (mainc + sidec) * (int)sizeof(int32_t)) else if
#ifdef YGOPRO_SERVER_MODE
(deck_size < (mainc + sidec) * (int)sizeof(int32_t) || deck_size > MAINC_MAX + SIDEC_MAX)
#else
(deck_size != (mainc + sidec) * (int)sizeof(int32_t))
#endif
valid = false; valid = false;
if (!valid) { if (!valid) {
STOC_ErrorMsg scem; STOC_ErrorMsg scem;
......
...@@ -390,7 +390,13 @@ void TagDuel::UpdateDeck(DuelPlayer* dp, unsigned char* pdata, int len) { ...@@ -390,7 +390,13 @@ void TagDuel::UpdateDeck(DuelPlayer* dp, unsigned char* pdata, int len) {
valid = false; valid = false;
else if (sidec < 0 || sidec > SIDEC_MAX) else if (sidec < 0 || sidec > SIDEC_MAX)
valid = false; valid = false;
else if (deck_size != (mainc + sidec) * (int)sizeof(int32_t)) else if
#ifdef YGOPRO_SERVER_MODE
(deck_size < (mainc + sidec) * (int)sizeof(int32_t) || deck_size > MAINC_MAX + SIDEC_MAX)
#else
(deck_size != (mainc + sidec) * (int)sizeof(int32_t))
#endif
(mainc + sidec) * (int)sizeof(int32_t))
valid = false; valid = false;
if (!valid) { if (!valid) {
STOC_ErrorMsg scem; STOC_ErrorMsg scem;
......
Subproject commit faa7e1d1552c13e26f430d6594c0c46435dc3ccb Subproject commit eccdab4349138c7c4aa1f2f44ea994dfa98c0b79
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