From 183d583f01d53c8bf9093ccf2c80d200f4beba06 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sat, 12 Jul 2008 23:53:35 +0200 Subject: [PATCH] Fix a clone bug. --- libqscale.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libqscale.c b/libqscale.c index ab19365..dc04028 100644 --- a/libqscale.c +++ b/libqscale.c @@ -500,11 +500,11 @@ qscale_img *qscale_clone(const qscale_img *img) } { dst->data_cb = (unsigned char *)malloc(dst->h1 * dstride1); - memcpy(dst->data_cb, img->data_cb, dst->h0 * dstride0); + memcpy(dst->data_cb, img->data_cb, dst->h1 * dstride1); } { - dst->data_cr = (unsigned char *)malloc(dst->h1 * dstride1); - memcpy(dst->data_cr, img->data_cr, dst->h0 * dstride0); + dst->data_cr = (unsigned char *)malloc(dst->h2 * dstride2); + memcpy(dst->data_cr, img->data_cr, dst->h2 * dstride2); } return dst; -- 2.39.2