summaryrefslogtreecommitdiff
path: root/lib/libc/string/strcpy.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/string/strcpy.c')
-rw-r--r--lib/libc/string/strcpy.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libc/string/strcpy.c b/lib/libc/string/strcpy.c
index 94e88b362a1..86956cdb957 100644
--- a/lib/libc/string/strcpy.c
+++ b/lib/libc/string/strcpy.c
@@ -1,3 +1,5 @@
+/* $OpenBSD: strcpy.c,v 1.2 1996/03/09 02:42:57 niklas Exp $ */
+
/*
* Copyright (c) 1988 Regents of the University of California.
* All rights reserved.
@@ -33,7 +35,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)strcpy.c 5.7 (Berkeley) 2/24/91";*/
-static char *rcsid = "$Id: strcpy.c,v 1.1 1995/10/18 08:42:22 deraadt Exp $";
+static char *rcsid = "$Id: strcpy.c,v 1.2 1996/03/09 02:42:57 niklas Exp $";
#endif /* LIBC_SCCS and not lint */
#include <string.h>
@@ -45,6 +47,6 @@ strcpy(to, from)
{
char *save = to;
- for (; *to = *from; ++from, ++to);
+ for (; (*to = *from) != '\0'; ++from, ++to);
return(save);
}