From caff2c90062016aa941021759e6b41a4827d3346 Mon Sep 17 00:00:00 2001 From: castano Date: Tue, 1 Jun 2010 17:51:57 +0000 Subject: [PATCH] Fix assert when reading paletted TGA images. Fixes issue 125. --- src/nvimage/ImageIO.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nvimage/ImageIO.cpp b/src/nvimage/ImageIO.cpp index 1c4e6b3..a7e858c 100644 --- a/src/nvimage/ImageIO.cpp +++ b/src/nvimage/ImageIO.cpp @@ -669,7 +669,7 @@ Image * nv::ImageIO::loadTGA(Stream & s) // Read palette uint8 palette[768]; if( pal ) { - nvDebugCheck(tga.colormap_length < 256); + nvDebugCheck(tga.colormap_length <= 256); s.serialize(palette, 3 * tga.colormap_length); }