From 70bc60104fa55318e42982b76bd91ffafe85ccd3 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Sat, 11 Jun 2016 21:44:33 +0800 Subject: [PATCH] try to fix compilation ../projects/mtg/include/AllAbilities.h:706: error: suggest explicit braces to avoid ambiguous 'else' --- projects/mtg/include/AllAbilities.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index da14773a9..285d50efc 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -703,12 +703,10 @@ private: else if (s == "morethanfourcards") { intValue = 0; - if(card->playerTarget)//blackvise - if ((card->playerTarget->game->hand->nb_cards - 4)>0) - intValue = (card->playerTarget->game->hand->nb_cards - 4); - else//viseling - if ((card->controller()->opponent()->game->hand->nb_cards - 4)>0) - intValue = (card->controller()->opponent()->game->hand->nb_cards - 4); + if ((card->playerTarget) && (card->playerTarget->game->hand->nb_cards - 4)>0) + intValue = (card->playerTarget->game->hand->nb_cards - 4); + else if ((card->controller()->opponent()->game->hand->nb_cards - 4)>0) + intValue = (card->controller()->opponent()->game->hand->nb_cards - 4); } else if (s == "powertotalinplay")//Count Total Power of Creatures you control... Formidable {