From af5c74981b2588abab1d3a08b306733268e4897c Mon Sep 17 00:00:00 2001 From: Andrey Akhmichin <15944199+nekonomicon@users.noreply.github.com> Date: Mon, 19 Dec 2022 00:38:32 +0500 Subject: [PATCH] ref: soft: replace va function calls. --- ref/soft/r_sprite.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ref/soft/r_sprite.c b/ref/soft/r_sprite.c index 5aa0f74d..4348e7d0 100644 --- a/ref/soft/r_sprite.c +++ b/ref/soft/r_sprite.c @@ -242,6 +242,7 @@ void Mod_LoadMapSprite( model_t *mod, const void *buffer, size_t size, qboolean int linedelta, numframes; mspriteframe_t *pspriteframe; msprite_t *psprite; + char poolname[MAX_VA_STRING]; if( loaded ) *loaded = false; Q_snprintf( texname, sizeof( texname ), "#%s", mod->name ); @@ -275,7 +276,8 @@ void Mod_LoadMapSprite( model_t *mod, const void *buffer, size_t size, qboolean // determine how many frames we needs numframes = (pix->width * pix->height) / (w * h); - mod->mempool = Mem_AllocPool( va( "^2%s^7", mod->name )); + Q_snprintf( poolname, sizeof( poolname ), "^2%s^7", mod->name ); + mod->mempool = Mem_AllocPool( poolname ); psprite = Mem_Calloc( mod->mempool, sizeof( msprite_t ) + ( numframes - 1 ) * sizeof( psprite->frames )); mod->cache.data = psprite; // make link to extradata