summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/get.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2018-01-29 14:19:44 -0700
committerBrian Paul <[email protected]>2018-01-29 21:15:52 -0700
commit94843e60562c52975325f59f21cb1c8e89f2fe20 (patch)
treee1f59a403c9763be5404ad58caa58194ec9a072c /src/mesa/main/get.c
parente4ca1d64565b4d665bcaf5d08922bfbe1d920e7a (diff)
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 <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/main/get.c')
-rw-r--r--src/mesa/main/get.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index 5fee9a60bc3..bafd1e35b29 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -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()");
}