From 947db38bc9cb2be664491762b886cc0d1d905906 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Sun, 22 May 2022 11:53:46 +1000 Subject: [PATCH] [client] egl: fix mistake in rect clamping --- client/renderers/EGL/texture.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/renderers/EGL/texture.c b/client/renderers/EGL/texture.c index b5e89e71..752ee21c 100644 --- a/client/renderers/EGL/texture.c +++ b/client/renderers/EGL/texture.c @@ -126,8 +126,8 @@ bool egl_textureUpdateRect(EGL_Texture * this, { x = clamp(x , 0, this->format.width ); y = clamp(y , 0, this->format.height ); - width = clamp(width , x, this->format.width - x); - height = clamp(height, y, this->format.height - y); + width = clamp(width , 0, this->format.width - x); + height = clamp(height, 0, this->format.height - y); if (!width || !height) return true;