[Scummvm-git-logs] scummvm master -> 07834616b3741dfbf6b345a7610244faa105382d
bgK
bastien.bouclet at gmail.com
Sun Mar 3 13:44:56 CET 2019
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
07834616b3 GRAPHICS: Fix dstFormat check in Surface::convertTo
Commit: 07834616b3741dfbf6b345a7610244faa105382d
https://github.com/scummvm/scummvm/commit/07834616b3741dfbf6b345a7610244faa105382d
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2019-03-03T13:44:53+01:00
Commit Message:
GRAPHICS: Fix dstFormat check in Surface::convertTo
Changed paths:
graphics/surface.cpp
diff --git a/graphics/surface.cpp b/graphics/surface.cpp
index de921a7..265249e 100644
--- a/graphics/surface.cpp
+++ b/graphics/surface.cpp
@@ -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);
More information about the Scummvm-git-logs
mailing list