mesa: fix arithmetic error in _mesa_compute_compressed_pixelstore()
authorBrian Paul <brianp@vmware.com>
Fri, 5 Sep 2014 21:20:00 +0000 (15:20 -0600)
committerBrian Paul <brianp@vmware.com>
Mon, 1 Dec 2014 23:30:55 +0000 (16:30 -0700)
We need parenthesis around the expression which computes the number of
blocks per row.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Cc: "10.3 10.4" <mesa-stable@lists.freedesktop.org>
src/mesa/main/texstore.c

index f858cef5061db947cb948cefa8561f428b973533..50aa1fd5ef0f7dc7d4df437355d48799667c266d 100644 (file)
@@ -2231,7 +2231,7 @@ _mesa_compute_compressed_pixelstore(GLuint dims, mesa_format texFormat,
 
       if (packing->RowLength) {
          store->TotalBytesPerRow = packing->CompressedBlockSize *
-            (packing->RowLength + bw - 1) / bw;
+            ((packing->RowLength + bw - 1) / bw);
       }
 
       store->SkipBytes += packing->SkipPixels * packing->CompressedBlockSize / bw;