fixed a fast_atof bug with negative exponents

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@702 dfc29bdd-3216-0410-991c-e03cc46cb475
master
bitplane 2007-06-09 14:32:18 +00:00
parent c729f356f0
commit 88cb2efacc
2 changed files with 9 additions and 1 deletions

View File

@ -1,5 +1,7 @@
Changes in version 1.3.1 (?? Mar 2007)
- Fixed a bug with negative exponents in fast_atof, posted by RVL
- renamed IAnimatedMeshSceneNode::getAbsoluteTransformation to getMD3TagTransformation
to avoid conflicts with ISceneNode::getAbsoluteTransformation

View File

@ -86,8 +86,14 @@ inline const char* fast_atof_move( const char* c, float& out)
{
++c;
//float exp = (float)strtol(c, &t, 10);
bool einv = (*c=='-');
if (einv)
c++;
float exp = (float)strtol10(c, t);
if (einv)
exp *= -1.0f;
f *= (float)pow(10.0f, exp);
c = t;
}