fix(client): check deck len in MarkCardInDeckToBeTrashed
1 files changed, 3 insertions(+), 0 deletions(-) M client/src/game_status/parser.rs
M client/src/game_status/parser.rs => client/src/game_status/parser.rs +3 -0
@@ 268,6 268,9 @@ fn parse_action(action: &Action, game: &Game, game_status: &mut GameStatus) { target.vp += amount; } Command::MarkCardInDeckToBeTrashed { index } => { + if target.deck.len() == 0 { + return; + } match index { Some(index) => { target.deck.get_mut(*index).unwrap().to_be_trashed = true;