summaryrefslogtreecommitdiffstats
path: root/grid.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2009-07-16 07:35:35 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2009-07-16 07:35:35 +0000
commitd956ed07604b94b43090dfb423f36fe2bf9af31b (patch)
treea7ab208a7fa607c665c9ac706bb7a26efbb9c84e /grid.c
parent6fe25a08d76736781d597d237a9a9f46a66676bb (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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/grid.c b/grid.c
index acc9ffb6..80399349 100644
--- a/grid.c
+++ b/grid.c
@@ -1,4 +1,4 @@
-/* $Id: grid.c,v 1.24 2009-07-14 06:40:33 nicm Exp $ */
+/* $Id: grid.c,v 1.25 2009-07-16 07:35:35 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));