From 9ac370014698fda062b41e86a6c20306d6573292 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 16 Feb 2015 08:38:56 -0700 Subject: mesa: move assertion after declarations in texstore.c To fix MSVC build. --- src/mesa/main/texstore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa/main') diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c index f25c0d7e0e1..7039cdf8174 100644 --- a/src/mesa/main/texstore.c +++ b/src/mesa/main/texstore.c @@ -729,9 +729,9 @@ texstore_rgba(TEXSTORE_PARAMS) GLint swapSize = _mesa_sizeof_packed_type(srcType); if (swapSize == 2 || swapSize == 4) { int bytesPerPixel = _mesa_bytes_per_pixel(srcFormat, srcType); - assert(bytesPerPixel % swapSize == 0); int swapsPerPixel = bytesPerPixel / swapSize; int elementCount = srcWidth * srcHeight * srcDepth; + assert(bytesPerPixel % swapSize == 0); tempImage = malloc(elementCount * bytesPerPixel); if (!tempImage) return GL_FALSE; -- cgit v1.2.3