[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 2021-07-28 17:37:46 -04:00 committed by Geoffrey McRae
parent 2ea84cd07e
commit aff3bff8b0

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;
}
}