From 28134aca63ec06b49efef69bd2575dde780288eb Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Mon, 18 Aug 2014 17:12:39 +0000 Subject: [PATCH] Change Cvar_Cycle_f to use Q_atof to be consistent with other cvar code. Q_atof("0.3"), a float, does not == atof("0.3"), a double. Fixes "cycle r_wateralpha 0.3 0.6 1" not working reported by AAS. git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@969 af15c1b1-3010-417e-b628-4374ebc0bcbd --- Quake/cvar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Quake/cvar.c b/Quake/cvar.c index 1dd9ff29..cdbcb11e 100644 --- a/Quake/cvar.c +++ b/Quake/cvar.c @@ -145,14 +145,14 @@ void Cvar_Cycle_f (void) //zero is assumed to be a string, even though it could actually be zero. The worst case //is that the first time you call this command, it won't match on zero when it should, but after that, //it will be comparing strings that all had the same source (the user) so it will work. - if (atof(Cmd_Argv(i)) == 0) + if (Q_atof(Cmd_Argv(i)) == 0) { if (!strcmp(Cmd_Argv(i), Cvar_VariableString(Cmd_Argv(1)))) break; } else { - if (atof(Cmd_Argv(i)) == Cvar_VariableValue(Cmd_Argv(1))) + if (Q_atof(Cmd_Argv(i)) == Cvar_VariableValue(Cmd_Argv(1))) break; } }