diff --git a/branches/2.0/ChangeLog b/branches/2.0/ChangeLog index 3b398bb..c8b1152 100644 --- a/branches/2.0/ChangeLog +++ b/branches/2.0/ChangeLog @@ -1,3 +1,6 @@ +NVIDIA Texture Tools version 2.0.9 + * Fix invalid assert when reading paletted TGA images. Fixes issue 125. + NVIDIA Texture Tools version 2.0.8 * Fix float to fixed image conversion. Patch provided by Alex Pfaffe. Fixes issue 121. * ColorBlock::isSingleColor compares only RGB channels. Fixes issue 115. diff --git a/branches/2.0/src/nvimage/ImageIO.cpp b/branches/2.0/src/nvimage/ImageIO.cpp index 0b24600..55177cd 100644 --- a/branches/2.0/src/nvimage/ImageIO.cpp +++ b/branches/2.0/src/nvimage/ImageIO.cpp @@ -266,7 +266,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); } diff --git a/trunk/src/nvimage/ImageIO.cpp b/trunk/src/nvimage/ImageIO.cpp index 1c4e6b3..a7e858c 100644 --- a/trunk/src/nvimage/ImageIO.cpp +++ b/trunk/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); }