From acc7dee80f42e0b943196a65c6ada6e2132a88b8 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. --- ChangeLog | 3 +++ src/nvimage/ImageIO.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 3b398bb..c8b1152 100644 --- a/ChangeLog +++ b/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/src/nvimage/ImageIO.cpp b/src/nvimage/ImageIO.cpp index 0b24600..55177cd 100644 --- a/src/nvimage/ImageIO.cpp +++ b/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); }