From aff3bff8b0f305c7db233d15680a79d539546172 Mon Sep 17 00:00:00 2001 From: Quantum Date: Wed, 28 Jul 2021 17:37:46 -0400 Subject: [PATCH] [common] framebuffer: fix copy when source and dest pitch differs We used to increment the source buffer index by width * bpp, not by pitch. This is incorrect and the root cause behind #670. This is a regression that appeared in 196050bd2381f4d7dbf6149c3347932951a47ebf. --- common/src/framebuffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/framebuffer.c b/common/src/framebuffer.c index 351b721e..0d709e3e 100644 --- a/common/src/framebuffer.c +++ b/common/src/framebuffer.c @@ -99,7 +99,7 @@ bool framebuffer_read(const FrameBuffer * frame, void * restrict dst, return false; memcpy(d, frame->data + rp, dstpitch); - rp += linewidth; + rp += pitch; d += dstpitch; } }