summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/grid.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2009-07-16 07:34:37 +0000
committernicm <nicm@openbsd.org>2009-07-16 07:34:37 +0000
commit0a5b181f5e07dd0c462ccf87b78f1a17cc1736b3 (patch)
tree2fbe3c37147cfb5bb7ef5bcca0a484ba88bfdee5 /usr.bin/tmux/grid.c
parent- Add missing tick handler calling mii_tick(). (diff)
downloadwireguard-openbsd-0a5b181f5e07dd0c462ccf87b78f1a17cc1736b3.tar.xz
wireguard-openbsd-0a5b181f5e07dd0c462ccf87b78f1a17cc1736b3.zip
Typo in grid_duplicate_lines (sy for dy) causing it to write into the wrong
place when copying UTF-8 data. Found by Dan Colish.
Diffstat (limited to 'usr.bin/tmux/grid.c')
-rw-r--r--usr.bin/tmux/grid.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tmux/grid.c b/usr.bin/tmux/grid.c
index 0e14c780829..d09d2d1684e 100644
--- a/usr.bin/tmux/grid.c
+++ b/usr.bin/tmux/grid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: grid.c,v 1.7 2009/07/13 10:43:52 nicm Exp $ */
+/* $OpenBSD: grid.c,v 1.8 2009/07/16 07:34:37 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -554,7 +554,7 @@ grid_duplicate_lines(
if (src->usize[sy] == 0)
dst->udata[dy] = NULL;
else {
- dst->udata[sy] = xcalloc(
+ dst->udata[dy] = xcalloc(
src->usize[sy], sizeof **dst->udata);
memcpy(dst->udata[dy], src->udata[sy],
src->usize[sy] * (sizeof **dst->udata));