summaryrefslogtreecommitdiff
path: root/usr.bin/mg
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-05-23 22:26:25 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-05-23 22:26:25 +0000
commit6fee94e281db17f3aee1c52d44b07d6ed26dad97 (patch)
treefd85dfdca71919b1174951d7e36512d28c94fd12 /usr.bin/mg
parent8fc9821df3ffdbd090f2d11c1a7585c61b358ed5 (diff)
sprintf instead of two strcpy (there was a bug here)
Diffstat (limited to 'usr.bin/mg')
-rw-r--r--usr.bin/mg/buffer.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.bin/mg/buffer.c b/usr.bin/mg/buffer.c
index 533b17e00c9..6eb03cabe99 100644
--- a/usr.bin/mg/buffer.c
+++ b/usr.bin/mg/buffer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: buffer.c,v 1.12 2001/05/23 22:20:34 art Exp $ */
+/* $OpenBSD: buffer.c,v 1.13 2001/05/23 22:26:24 art Exp $ */
/*
* Buffer handling.
@@ -299,8 +299,7 @@ anycb(f)
for (bp = bheadp; bp != NULL; bp = bp->b_bufp) {
if (*(bp->b_fname) != '\0'
&& (bp->b_flag & BFCHG) != 0) {
- (void) strcpy(prompt, "Save file ");
- (void) strcpy(prompt + 10, bp->b_fname);
+ sprintf(prompt, "Save file %s", bp->b_fname);
if ((f == TRUE || (save = eyorn(prompt)) == TRUE)
&& buffsave(bp) == TRUE) {
bp->b_flag &= ~BFCHG;