Fix assert when reading paletted TGA images. Fixes issue 125.

This commit is contained in:
castano 2010-06-01 17:51:57 +00:00
parent da503d2b3e
commit caff2c9006

View File

@ -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);
}