mirror of
https://git.code.sf.net/p/quake/newtree
synced 2025-05-30 16:50:48 +00:00
change %f to %g in Cvar_SetValue so 1.0 gets printed as 1
This commit is contained in:
parent
d295f183ba
commit
0e950c65f5
1 changed files with 1 additions and 1 deletions
|
@ -237,7 +237,7 @@ void Cvar_SetValue (cvar_t *var, float value)
|
|||
char val[32];
|
||||
int i;
|
||||
|
||||
sprintf (val, "%f", value);
|
||||
sprintf (val, "%g", value);
|
||||
for (i=strlen(val)-1 ; i>0 && val[i]=='0' && val[i-1]!='.' ; i--)
|
||||
{
|
||||
val[i] = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue