Fix assert when reading paletted TGA images. Fixes issue 125.
This commit is contained in:
parent
da503d2b3e
commit
caff2c9006
|
@ -669,7 +669,7 @@ Image * nv::ImageIO::loadTGA(Stream & s)
|
||||||
// Read palette
|
// Read palette
|
||||||
uint8 palette[768];
|
uint8 palette[768];
|
||||||
if( pal ) {
|
if( pal ) {
|
||||||
nvDebugCheck(tga.colormap_length < 256);
|
nvDebugCheck(tga.colormap_length <= 256);
|
||||||
s.serialize(palette, 3 * tga.colormap_length);
|
s.serialize(palette, 3 * tga.colormap_length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user