Merge pull request #4029 from realjiangms/fix_shadow_fragment_size

server/shadow: Fix incorrect bitmap fragment update.
This commit is contained in:
David Fort 2017-07-07 15:07:13 +02:00 committed by GitHub
commit 93e5b0647a

View File

@ -1111,19 +1111,14 @@ static BOOL shadow_client_send_bitmap_update(rdpShadowClient* client,
{
newUpdateSize = updateSize + (bitmapData[i].bitmapLength + 16);
if ((newUpdateSize < maxUpdateSize) && ((i + 1) < k))
if (newUpdateSize < maxUpdateSize)
{
CopyMemory(&fragBitmapData[j++], &bitmapData[i++], sizeof(BITMAP_DATA));
updateSize = newUpdateSize;
}
else
{
if ((i + 1) >= k)
{
CopyMemory(&fragBitmapData[j++], &bitmapData[i++], sizeof(BITMAP_DATA));
updateSize = newUpdateSize;
}
if ((newUpdateSize >= maxUpdateSize) || (i + 1) >= k)
{
bitmapUpdate.count = bitmapUpdate.number = j;
IFCALLRET(update->BitmapUpdate, ret, context, &bitmapUpdate);