Browse Source

Fixed a logic error making compressed textures with no mipmaps trigger a Lua error when they're loaded into an Image.

--HG--
branch : minor
Alex Szpakowski 11 years ago
parent
commit
a9630811d8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/modules/graphics/opengl/Image.cpp

+ 1 - 1
src/modules/graphics/opengl/Image.cpp

@@ -336,7 +336,7 @@ bool Image::loadVolatile()
 	if (isCompressed())
 	{
 		textureMemorySize = 0;
-		for (int i = 0; i < flags.mipmaps ? cdata->getMipmapCount() : 1; i++)
+		for (int i = 0; i < (flags.mipmaps ? cdata->getMipmapCount() : 1); i++)
 			textureMemorySize += cdata->getSize(i);
 	}
 	else