From be88fa6705ef3bbca4eb7d81ef36bc610a8fb554 Mon Sep 17 00:00:00 2001 From: akallabeth Date: Thu, 1 Jul 2021 13:38:08 +0200 Subject: [PATCH] Fixed surface buffer alignment --- server/shadow/shadow_surface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/shadow/shadow_surface.c b/server/shadow/shadow_surface.c index 62c449e4a..156c4b1b3 100644 --- a/server/shadow/shadow_surface.c +++ b/server/shadow/shadow_surface.c @@ -40,9 +40,9 @@ rdpShadowSurface* shadow_surface_new(rdpShadowServer* server, UINT16 x, UINT16 y surface->y = y; surface->width = width; surface->height = height; - surface->scanline = ALIGN_SCREEN_SIZE(surface->width, 4) * 4; + surface->scanline = ALIGN_SCREEN_SIZE(surface->width, 32) * 4; surface->format = PIXEL_FORMAT_BGRX32; - surface->data = (BYTE*)calloc(ALIGN_SCREEN_SIZE(surface->height, 4), surface->scanline); + surface->data = (BYTE*)calloc(ALIGN_SCREEN_SIZE(surface->height, 32), surface->scanline); if (!surface->data) {