fix segfault when attacks default back to SC

This commit is contained in:
Martin Michelsen
2024-02-11 21:39:17 -08:00
parent 198db59816
commit 46e509aa69
+1 -1
View File
@@ -1495,7 +1495,7 @@ void Card::apply_attack_result() {
} else {
auto target_sc = target_ps->get_sc_card();
if (!(target_sc->card_flags & 2)) {
temp_chain.chain.target_card_refs[temp_chain.chain.target_card_ref_count] = candidate_card->get_card_ref();
temp_chain.chain.target_card_refs[temp_chain.chain.target_card_ref_count] = target_sc->get_card_ref();
temp_chain.chain.target_card_ref_count++;
}
}