Skip to content
Permalink
Browse files

[common] fix bug in framebuffer_read

  • Loading branch information...
gnif committed Oct 9, 2019
1 parent 4168cc8 commit 8ef1aee35cd0a74d579e990b0f1a69cb71a408fd
Showing with 4 additions and 2 deletions.
  1. +1 −1 VERSION
  2. +3 −1 common/src/framebuffer.c
@@ -1 +1 @@
B1-7-gbca54ab1f6+1
B1-8-g4168cc8d78+1
@@ -31,6 +31,7 @@ struct stFrameBuffer

bool framebuffer_read(const FrameBuffer frame, void * dst, size_t size)
{
uint8_t *d = (uint8_t*)dst;
uint64_t rp = 0;
while(rp < size)
{
@@ -39,8 +40,9 @@ bool framebuffer_read(const FrameBuffer frame, void * dst, size_t size)

/* copy what we can */
uint64_t avail = frame->wp - rp;
memcpy(dst, frame->data + rp, avail);
memcpy(d, frame->data + rp, avail);
rp += avail;
d += avail;
}
return true;
}

0 comments on commit 8ef1aee

Please sign in to comment.
You can’t perform that action at this time.