Port Mesa to build on a P64 platform (e.g., Win64). P64 platforms
[mesa.git] / src / mesa / main / bufferobj.c
index 07b2341ff7a4f9f03b6e0982e000cc6f15970b6d..a1d4c0190a133141763d939a4db84c493edf7bc3 100644 (file)
@@ -449,11 +449,11 @@ _mesa_validate_pbo_access(GLuint dimensions,
                               format, type, depth-1, height-1, width);
 
 
-   if ((const GLubyte *) start > (const GLubyte *) pack->BufferObj->Size) {
+   if ((const GLubyte *) start > (const GLubyte *)(uintptr_t) pack->BufferObj->Size) {
       /* This will catch negative values / wrap-around */
       return GL_FALSE;
    }
-   if ((const GLubyte *) end > (const GLubyte *) pack->BufferObj->Size) {
+   if ((const GLubyte *) end > (const GLubyte *)(uintptr_t) pack->BufferObj->Size) {
       /* Image read goes beyond end of buffer */
       return GL_FALSE;
    }