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

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2014-10-06 20:09:10 -03:00
parent d527307adc
commit a9630811d8
+1 -1
View File
@@ -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