[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 196050bd23.
This commit is contained in:
Quantum authored and Geoffrey McRae committed 2021-07-29 10:18:35 +10:00
1 parent 2ea84cd07e
commit aff3bff8b0
1 file changed
+1 -1
+1 -1
View File
@@ -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;
}
}