mirror of
https://github.com/love2d/love.git
synced 2026-08-19 12:14:20 +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())
|
if (isCompressed())
|
||||||
{
|
{
|
||||||
textureMemorySize = 0;
|
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);
|
textureMemorySize += cdata->getSize(i);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user