From 2067b21d47a09635f10b372a1324cb74fdbfb06b Mon Sep 17 00:00:00 2001 From: Jacob McNamee Date: Thu, 9 May 2024 21:08:51 -0700 Subject: [PATCH] [client] egl: fix line copy size computation in `texBufferStreamUpdate` --- client/renderers/EGL/texture_buffer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/renderers/EGL/texture_buffer.c b/client/renderers/EGL/texture_buffer.c index 36e886db..227bfc42 100644 --- a/client/renderers/EGL/texture_buffer.c +++ b/client/renderers/EGL/texture_buffer.c @@ -196,7 +196,7 @@ static bool egl_texBufferStreamUpdate(EGL_Texture * texture, const uint8_t * src = update->buffer; for(int y = 0; y < update->height; ++y) { - memcpy(dst, src, update->pitch); + memcpy(dst, src, update->width * texture->format.bpp); dst += texture->format.pitch; src += update->pitch; } @@ -207,7 +207,7 @@ static bool egl_texBufferStreamUpdate(EGL_Texture * texture, for(int y = 0; y < update->height; ++y) { src -= update->pitch; - memcpy(dst, src, update->pitch); + memcpy(dst, src, update->width * texture->format.bpp); dst += texture->format.pitch; } }