diff --git a/engine/client/cl_spray.c b/engine/client/cl_spray.c index 5525bebc..1b5be862 100644 --- a/engine/client/cl_spray.c +++ b/engine/client/cl_spray.c @@ -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 )