1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 06:14:58 +00:00

LibGL: Make GLsizeiptr signed

The Khronos description of a "non-negative binary integer" does not mean
an unsigned type, just that it should not be negative.
This commit is contained in:
Jelle Raaijmakers 2023-01-03 16:55:40 +01:00 committed by Linus Groh
parent e7627af555
commit 62092a329d
2 changed files with 2 additions and 2 deletions

View file

@ -61,7 +61,7 @@ void GLContext::gl_buffer_sub_data(GLenum target, GLintptr offset, GLsizeiptr si
auto& target_buffer = target == GL_ELEMENT_ARRAY_BUFFER ? m_element_array_buffer : m_array_buffer;
RETURN_WITH_ERROR_IF(!target_buffer, GL_INVALID_OPERATION);
RETURN_WITH_ERROR_IF((offset + size) > target_buffer->size(), GL_INVALID_VALUE);
RETURN_WITH_ERROR_IF(static_cast<size_t>(offset + size) > target_buffer->size(), GL_INVALID_VALUE);
target_buffer->replace_data(data, offset, size);
}

View file

@ -32,7 +32,7 @@ typedef long GLintptr;
typedef unsigned int GLuint;
typedef int GLfixed;
typedef int GLsizei;
typedef unsigned long GLsizeiptr;
typedef long GLsizeiptr;
typedef void GLvoid;
typedef float GLfloat;
typedef double GLclampd;