From 712a7e7a8a46dbed5b9d062302bf76f701f365bf Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Wed, 8 Jul 2020 17:08:30 +0800 Subject: [PATCH] 1 --- server/gameserver/player.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/server/gameserver/player.cc b/server/gameserver/player.cc index c60c6f3..a21dff7 100644 --- a/server/gameserver/player.cc +++ b/server/gameserver/player.cc @@ -1348,8 +1348,10 @@ void Player::ProcPreSettlementInfo(const std::string& pre_settlement_info) { std::vector tmp_strings; a8::Split(pre_settlement_info, tmp_strings, ','); - game_times = a8::XValue(tmp_strings[0]); - win_times = a8::XValue(tmp_strings[1]); - kill_times = a8::XValue(tmp_strings[2]); - rank = a8::XValue(tmp_strings[3]); + if (tmp_strings.size() >= 4) { + game_times = a8::XValue(tmp_strings[0]); + win_times = a8::XValue(tmp_strings[1]); + kill_times = a8::XValue(tmp_strings[2]); + rank = a8::XValue(tmp_strings[3]); + } }