mesa/st: use llabs instead of abs for long args (v2)
authorFrancesco Ansanelli <francians@gmail.com>
Tue, 16 Aug 2016 12:38:46 +0000 (14:38 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 17 Aug 2016 12:16:29 +0000 (14:16 +0200)
v2: long has 32bit on Windows (Marek)
Signed-off-by: Francesco Ansanelli <francians@gmail.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/state_tracker/st_atom_array.c

index dcead27ea3640354aafd3cc0b0381b9da506293f..1c2cfa791cdca972a690185a4f6f0317217b5bf3 100644 (file)
@@ -363,7 +363,7 @@ is_interleaved_arrays(const struct st_vertex_program *vp,
          if (bufObj != firstBufObj)
             return GL_FALSE; /* arrays in different VBOs */
 
-         if (abs(array->Ptr - firstPtr) > firstStride)
+         if (llabs(array->Ptr - firstPtr) > firstStride)
             return GL_FALSE; /* arrays start too far apart */
 
          if ((!_mesa_is_bufferobj(bufObj)) != userSpaceBuffer)