GRAPHICS: Fix dstFormat check in Surface::convertTo
This commit is contained in:
parent
342733cee6
commit
07834616b3
1 changed files with 1 additions and 1 deletions
|
@ -434,7 +434,7 @@ Graphics::Surface *Surface::convertTo(const PixelFormat &dstFormat, const byte *
|
|||
if (format.bytesPerPixel == 0 || format.bytesPerPixel > 4)
|
||||
error("Surface::convertTo(): Can only convert from 1Bpp, 2Bpp, 3Bpp, and 4Bpp");
|
||||
|
||||
if (dstFormat.bytesPerPixel < 2 && dstFormat.bytesPerPixel > 4)
|
||||
if (dstFormat.bytesPerPixel < 2 || dstFormat.bytesPerPixel > 4)
|
||||
error("Surface::convertTo(): Can only convert to 2Bpp, 3Bpp and 4Bpp");
|
||||
|
||||
surface->create(w, h, dstFormat);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue