Commit 88cb2efa authored by bitplane's avatar bitplane

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
parent c729f356
Changes in version 1.3.1 (?? Mar 2007) 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 - renamed IAnimatedMeshSceneNode::getAbsoluteTransformation to getMD3TagTransformation
to avoid conflicts with ISceneNode::getAbsoluteTransformation to avoid conflicts with ISceneNode::getAbsoluteTransformation
......
...@@ -86,8 +86,14 @@ inline const char* fast_atof_move( const char* c, float& out) ...@@ -86,8 +86,14 @@ inline const char* fast_atof_move( const char* c, float& out)
{ {
++c; ++c;
//float exp = (float)strtol(c, &t, 10); //float exp = (float)strtol(c, &t, 10);
bool einv = (*c=='-');
if (einv)
c++;
float exp = (float)strtol10(c, t); float exp = (float)strtol10(c, t);
if (einv)
exp *= -1.0f;
f *= (float)pow(10.0f, exp); f *= (float)pow(10.0f, exp);
c = t; c = t;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment