summaryrefslogtreecommitdiffstats
path: root/grid.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-07-16 07:34:37 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-07-16 07:34:37 +0000
commit924bf8477fc30af5ed241e7f7536eb133ab9b702 (patch)
tree6cd947d3a93865811df98ccdcfa482b35b5fd49d /grid.c
parent92da443a9e02a2238d4415e0dcf3796d3929b290 (diff)
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 'grid.c')
-rw-r--r--grid.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/grid.c b/grid.c
index 38560f73..0fbdbd0a 100644
--- a/grid.c
+++ b/grid.c
@@ -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));