Don't use variables as format strings.
This commit is contained in:
parent
278b576ff4
commit
76266ce815
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: io.c,v 1.25 2011/05/23 22:47:22 joerg Exp $ */
|
/* $NetBSD: io.c,v 1.26 2011/05/23 22:48:52 joerg Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1980, 1993
|
* Copyright (c) 1980, 1993
|
||||||
@ -34,7 +34,7 @@
|
|||||||
#if 0
|
#if 0
|
||||||
static char sccsid[] = "@(#)io.c 8.1 (Berkeley) 5/31/93";
|
static char sccsid[] = "@(#)io.c 8.1 (Berkeley) 5/31/93";
|
||||||
#else
|
#else
|
||||||
__RCSID("$NetBSD: io.c,v 1.25 2011/05/23 22:47:22 joerg Exp $");
|
__RCSID("$NetBSD: io.c,v 1.26 2011/05/23 22:48:52 joerg Exp $");
|
||||||
#endif
|
#endif
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
@ -106,13 +106,13 @@ msgcrd(CARD c, BOOLEAN brfrank, const char *mid, BOOLEAN brfsuit)
|
|||||||
if (brfrank)
|
if (brfrank)
|
||||||
addmsg("%1.1s", rankchar[c.rank]);
|
addmsg("%1.1s", rankchar[c.rank]);
|
||||||
else
|
else
|
||||||
addmsg(rankname[c.rank]);
|
addmsg("%s", rankname[c.rank]);
|
||||||
if (mid != NULL)
|
if (mid != NULL)
|
||||||
addmsg(mid);
|
addmsg("%s", mid);
|
||||||
if (brfsuit)
|
if (brfsuit)
|
||||||
addmsg("%1.1s", suitchar[c.suit]);
|
addmsg("%1.1s", suitchar[c.suit]);
|
||||||
else
|
else
|
||||||
addmsg(suitname[c.suit]);
|
addmsg("%s", suitname[c.suit]);
|
||||||
return (TRUE);
|
return (TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -180,7 +180,7 @@ infrom(const CARD hand[], int n, const char *prompt)
|
|||||||
exit(74);
|
exit(74);
|
||||||
}
|
}
|
||||||
for (;;) {
|
for (;;) {
|
||||||
msg(prompt);
|
msg("%s", prompt);
|
||||||
if (incard(&crd)) { /* if card is full card */
|
if (incard(&crd)) { /* if card is full card */
|
||||||
if (!is_one(crd, hand, n))
|
if (!is_one(crd, hand, n))
|
||||||
msg("That's not in your hand");
|
msg("That's not in your hand");
|
||||||
@ -330,7 +330,7 @@ number(int lo, int hi, const char *prompt)
|
|||||||
int sum;
|
int sum;
|
||||||
|
|
||||||
for (sum = 0;;) {
|
for (sum = 0;;) {
|
||||||
msg(prompt);
|
msg("%s", prompt);
|
||||||
if (!(p = get_line()) || *p == '\0') {
|
if (!(p = get_line()) || *p == '\0') {
|
||||||
msg(quiet ? "Not a number" :
|
msg(quiet ? "Not a number" :
|
||||||
"That doesn't look like a number");
|
"That doesn't look like a number");
|
||||||
|
Loading…
Reference in New Issue
Block a user