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>
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()");
}