Merge pull request #61 from trofi/master

src/gui.c: always use "%s"-style format for printf()-style functions
This commit is contained in:
Murilo Pereira 2021-11-03 10:43:24 +01:00 committed by GitHub
commit acc75d4224
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,9 +13,9 @@ static const char *card_values[13] = {"A", "2", "3", "4", "5", "6", "7",
"8", "9", "10", "J", "Q", "K"};
static void draw_value(struct card *card) {
mvwprintw(card->frame->window, 0, 0, card_values[card->value]);
mvwprintw(card->frame->window, 0, 0, "%s", card_values[card->value]);
mvwprintw(card->frame->window, 4, 7 - strlen(card_values[card->value]),
card_values[card->value]);
"%s", card_values[card->value]);
}
static void draw_suit(struct card *card) {
@ -43,9 +43,9 @@ static void draw_suit(struct card *card) {
}
}
mvwprintw(card->frame->window, 0, strlen(card_values[card->value]),
card_suits[card->suit]);
"%s", card_suits[card->suit]);
mvwprintw(card->frame->window, 4, 6 - strlen(card_values[card->value]),
card_suits[card->suit]);
"%s", card_suits[card->suit]);
if (card->suit % 2 == 0) {
wattroff(card->frame->window, COLOR_PAIR(RED_ON_WHITE));
} else {