mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2025-02-20 02:43:07 +00:00
Work-around for a bug in the work-around for an engine bug ($evalint/float and negative numbers).
This commit is contained in:
parent
c288335496
commit
0103d1cbb5
1 changed files with 4 additions and 4 deletions
|
@ -542,9 +542,9 @@ qboolean PC_Float_Parse(int handle, float *f)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (negative)
|
if (negative)
|
||||||
*f = -atof(token.string);
|
*f = -Q_fabs(token.floatvalue);
|
||||||
else
|
else
|
||||||
*f = atof(token.string);
|
*f = Q_fabs(token.floatvalue);
|
||||||
|
|
||||||
return qtrue;
|
return qtrue;
|
||||||
}
|
}
|
||||||
|
@ -652,9 +652,9 @@ qboolean PC_Int_Parse(int handle, int *i)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (negative)
|
if (negative)
|
||||||
*i = -atoi(token.string);
|
*i = -abs(token.intvalue);
|
||||||
else
|
else
|
||||||
*i = atoi(token.string);
|
*i = abs(token.intvalue);
|
||||||
|
|
||||||
return qtrue;
|
return qtrue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue