projects
/
unix-history
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
23fac13
)
sprintf doesn't necessarily return its first arg
author
Keith Bostic
<bostic@ucbvax.Berkeley.EDU>
Wed, 7 Oct 1987 23:52:27 +0000
(15:52 -0800)
committer
Keith Bostic
<bostic@ucbvax.Berkeley.EDU>
Wed, 7 Oct 1987 23:52:27 +0000
(15:52 -0800)
SCCS-vsn: games/sail/pl_7.c 5.2
usr/src/games/sail/pl_7.c
patch
|
blob
|
blame
|
history
diff --git
a/usr/src/games/sail/pl_7.c
b/usr/src/games/sail/pl_7.c
index
5ca33a6
..
c0408d3
100644
(file)
--- a/
usr/src/games/sail/pl_7.c
+++ b/
usr/src/games/sail/pl_7.c
@@
-5,7
+5,7
@@
*/
#ifndef lint
*/
#ifndef lint
-static char sccsid[] = "@(#)pl_7.c 5.
1
(Berkeley) %G%";
+static char sccsid[] = "@(#)pl_7.c 5.
2
(Berkeley) %G%";
#endif not lint
#include "player.h"
#endif not lint
#include "player.h"
@@
-136,9
+136,11
@@
struct ship *ship;
{
static char buf[60];
{
static char buf[60];
- if (ship != 0)
-
p =
sprintf(buf, p, ship->shipname, colours(ship),
+ if (ship != 0)
{
+
(void)
sprintf(buf, p, ship->shipname, colours(ship),
sterncolour(ship));
sterncolour(ship));
+ p = buf;
+ }
sc_prompt = p;
sc_buf = "";
sc_hasprompt = 1;
sc_prompt = p;
sc_buf = "";
sc_hasprompt = 1;