1
0
Fork 0
forked from fte/fteqw

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:
Blub 2009-09-04 10:35:41 +00:00
parent 25c5f6ba1b
commit e1e589e729

View file

@ -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);
}
}