From: Brian Paul Date: Fri, 5 Sep 2014 21:20:00 +0000 (-0600) Subject: mesa: fix arithmetic error in _mesa_compute_compressed_pixelstore() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=991d5cf8ce5c7842801fdb0378bf5aca5a59cc4c;p=mesa.git mesa: fix arithmetic error in _mesa_compute_compressed_pixelstore() We need parenthesis around the expression which computes the number of blocks per row. Reviewed-by: Matt Turner Cc: "10.3 10.4" --- diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c index f858cef5061..50aa1fd5ef0 100644 --- a/src/mesa/main/texstore.c +++ b/src/mesa/main/texstore.c @@ -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;