keep using num*sign when the token has no . in it, since in such cases it shouldn't become NaN, and we cannot use atof on tokens like 0xABC which end up, too
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3369 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
25c5f6ba1b
commit
e1e589e729
1 changed files with 4 additions and 2 deletions
|
@ -1435,8 +1435,10 @@ void QCC_PR_LexNumber (void)
|
|||
else
|
||||
{
|
||||
pr_immediate_type = type_float;
|
||||
pr_immediate._float = atof(pr_token);
|
||||
//pr_immediate._float = (float)(num*sign);
|
||||
// at this point, we know there's no . in it, so the NaN bug shouldn't happen
|
||||
// and we cannot use atof on tokens like 0xabc, so use num*sign, it SHOULD be safe
|
||||
//pr_immediate._float = atof(pr_token);
|
||||
pr_immediate._float = (float)(num*sign);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue