mirror of
https://github.com/love2d/love.git
synced 2026-08-15 15:51:12 +02:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user