summaryrefslogtreecommitdiff
path: root/src/copy.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/copy.c')
-rw-r--r--src/copy.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/copy.c b/src/copy.c
index a3489c399..f0c6539b7 100644
--- a/src/copy.c
+++ b/src/copy.c
@@ -430,7 +430,8 @@ copy_reg (char const *src_name, char const *dst_name,
{
char *cp;
- buf[n_read] = 1; /* Sentinel to stop loop. */
+ wp = (word *) (buf + n_read);
+ *wp = 1; /* Sentinel to stop loop. */
/* Find first nonzero *word*, or the word with the sentinel. */