From ebe38639bcd8aac5302f969747796d940c5ab20b Mon Sep 17 00:00:00 2001 From: Jesse Buhagiar Date: Tue, 25 May 2021 23:21:31 +1000 Subject: [PATCH] LibGL: Fix incorrect sign compare caused by GLsizei changes --- Userland/Libraries/LibGL/SoftwareGLContext.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibGL/SoftwareGLContext.cpp b/Userland/Libraries/LibGL/SoftwareGLContext.cpp index c7d97ee17f..8c4c01539c 100644 --- a/Userland/Libraries/LibGL/SoftwareGLContext.cpp +++ b/Userland/Libraries/LibGL/SoftwareGLContext.cpp @@ -1251,8 +1251,8 @@ void SoftwareGLContext::gl_read_pixels(GLint x, GLint y, GLsizei width, GLsizei if (format == GL_DEPTH_COMPONENT) { // Read from depth buffer - for (size_t i = 0; i < height; ++i) { - for (size_t j = 0; j < width; ++j) { + for (GLsizei i = 0; i < height; ++i) { + for (GLsizei j = 0; j < width; ++j) { float depth = m_rasterizer.get_depthbuffer_value(x + j, y + i); switch (type) {