X-Git-Url: https://git.sesse.net/?p=qscale;a=blobdiff_plain;f=libqscale.c;fp=libqscale.c;h=dc040282001c74dd2fcdd644392d35a786902355;hp=ab1936505cf27505efe4b48fc251acc0760b0c2f;hb=183d583f01d53c8bf9093ccf2c80d200f4beba06;hpb=89b54dc15de5f3c27ce8bed9f1490b9b4ba16b35 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;