engine: client: use utility function to copy an image before quantization

This commit is contained in:
Alibek Omarov
2025-11-22 13:11:00 +05:00
parent 56972a811c
commit e8a2047d4c

View File

@@ -132,10 +132,7 @@ qboolean CL_ConvertImageToWAD3( const char *filename )
}
else
{
quant = Mem_Malloc( host.imagepool, sizeof( *quant ));
*quant = *image;
quant->buffer = Mem_Malloc( host.imagepool, quant->size );
memcpy( quant->buffer, image->buffer, quant->size );
quant = FS_CopyImage( image );
Image_Quantize( quant ); // it's so weird, it writes result to same structure as used for input data
if( !quant || !quant->buffer || !quant->palette )