engine: client: fix misleading gcc warning about printf format string not being literal
This commit is contained in:
parent
6bfa525080
commit
9be061735f
1 changed files with 10 additions and 12 deletions
|
@ -544,21 +544,19 @@ static void R_GetRendererName( char *dest, size_t size, const char *opt )
|
||||||
{
|
{
|
||||||
if( !Q_strstr( opt, "." OS_LIB_EXT ))
|
if( !Q_strstr( opt, "." OS_LIB_EXT ))
|
||||||
{
|
{
|
||||||
const char *format;
|
|
||||||
|
|
||||||
#ifdef XASH_INTERNAL_GAMELIBS
|
#ifdef XASH_INTERNAL_GAMELIBS
|
||||||
if( !Q_strcmp( opt, "ref_" ))
|
#define FMT1 "%s"
|
||||||
format = "%s";
|
#define FMT2 "ref_%s"
|
||||||
else
|
|
||||||
format = "ref_%s";
|
|
||||||
#else
|
#else
|
||||||
if( !Q_strcmp( opt, "ref_" ))
|
#define FMT1 OS_LIB_PREFIX "%s." OS_LIB_EXT
|
||||||
format = OS_LIB_PREFIX "%s." OS_LIB_EXT;
|
#define FMT2 OS_LIB_PREFIX "ref_%s." OS_LIB_EXT
|
||||||
else
|
|
||||||
format = OS_LIB_PREFIX "ref_%s." OS_LIB_EXT;
|
|
||||||
#endif
|
#endif
|
||||||
Q_snprintf( dest, size, format, opt );
|
if( !Q_strncmp( opt, "ref_", 4 ))
|
||||||
|
Q_snprintf( dest, size, FMT1, opt );
|
||||||
|
else
|
||||||
|
Q_snprintf( dest, size, FMT2, opt );
|
||||||
|
#undef FMT1
|
||||||
|
#undef FMT2
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue