diff options
Diffstat (limited to 'graphics/decoders/jpeg.cpp')
-rw-r--r-- | graphics/decoders/jpeg.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/graphics/decoders/jpeg.cpp b/graphics/decoders/jpeg.cpp index 5e926e60a0..75fdcd6e5a 100644 --- a/graphics/decoders/jpeg.cpp +++ b/graphics/decoders/jpeg.cpp @@ -74,7 +74,7 @@ const Surface *JPEGDecoder::getSurface() const { // Create an RGBA8888 surface _rgbSurface = new Graphics::Surface(); - _rgbSurface->create(_w, _h, Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0)); + _rgbSurface->create(_w, _h, Graphics::PixelFormat(4, 8, 8, 8, 0, 24, 16, 8, 0)); // Get our component surfaces const Graphics::Surface *yComponent = getComponent(1); @@ -487,8 +487,8 @@ bool JPEGDecoder::readDQT() { // Validate the table id tableId &= 0xF; - if (tableId > JPEG_MAX_QUANT_TABLES) { - warning("JPEG: Invalid number of components"); + if (tableId >= JPEG_MAX_QUANT_TABLES) { + warning("JPEG: Invalid quantization table"); return false; } |