mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 14:40:10 +01:00
mesa: fix incorrect size/error test in _mesa_GetUnsignedBytevEXT()
get_value_size() returns -1 for an error. The similar check in _mesa_GetUnsignedBytei_vEXT() is correct. Found by chance. There are apparently no Piglit tests which exercise glGetUnsignedBytei_vEXT() or glGetUnsignedBytevEXT(). Reviewed-by: Andres Rodriguez <andresx7@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
e4ca1d6456
commit
94843e6056
1 changed files with 1 additions and 1 deletions
|
|
@ -2064,7 +2064,7 @@ _mesa_GetUnsignedBytevEXT(GLenum pname, GLubyte *data)
|
|||
|
||||
d = find_value(func, pname, &p, &v);
|
||||
size = get_value_size(d->type, &v);
|
||||
if (size >= 0) {
|
||||
if (size <= 0) {
|
||||
_mesa_problem(ctx, "invalid value type in GetUnsignedBytevEXT()");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue