From 924bf8477fc30af5ed241e7f7536eb133ab9b702 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Thu, 16 Jul 2009 07:34:37 +0000 Subject: [PATCH] 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. --- grid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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));