aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/cine/pal.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/cine/pal.cpp b/engines/cine/pal.cpp
index a1c5b6f675..97d4b319dd 100644
--- a/engines/cine/pal.cpp
+++ b/engines/cine/pal.cpp
@@ -246,7 +246,7 @@ Palette &Palette::load(const byte *colors, const Graphics::PixelFormat format, c
}
byte *Palette::save(byte *colors, const uint numBytes, const Graphics::PixelFormat format) const {
- assert(numBytes <= format.bytesPerPixel * colorCount()); // Make sure there's enough output space
+ assert(format.bytesPerPixel * colorCount() <= numBytes); // Make sure there's enough output space
// Clear the part of the output palette we're going to be writing to with all black
memset(colors, 0, format.bytesPerPixel * colorCount());