summaryrefslogtreecommitdiffstats
path: root/opengl/tools/glgen/stubs/gles11/glDrawElementsIndirect.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'opengl/tools/glgen/stubs/gles11/glDrawElementsIndirect.cpp')
-rw-r--r--opengl/tools/glgen/stubs/gles11/glDrawElementsIndirect.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/opengl/tools/glgen/stubs/gles11/glDrawElementsIndirect.cpp b/opengl/tools/glgen/stubs/gles11/glDrawElementsIndirect.cpp
index 1833ee9..a091dc9 100644
--- a/opengl/tools/glgen/stubs/gles11/glDrawElementsIndirect.cpp
+++ b/opengl/tools/glgen/stubs/gles11/glDrawElementsIndirect.cpp
@@ -3,7 +3,7 @@ static void android_glDrawElementsIndirect(JNIEnv *_env, jobject, jint mode, jin
// In OpenGL ES, 'indirect' is a byte offset into a buffer, not a raw pointer.
// GL checks for too-large values. Here we only need to check for successful signed 64-bit
// to unsigned 32-bit conversion.
- if (sizeof(void*) != sizeof(jlong) && indirect > UINTPTR_MAX) {
+ if (sizeof(void*) != sizeof(jlong) && indirect > static_cast<jlong>(UINT32_MAX)) {
jniThrowException(_env, "java/lang/IllegalArgumentException", "indirect offset too large");
return;
}