diff options
author | Thomas Grill <xovo@users.sourceforge.net> | 2005-04-19 20:55:56 +0000 |
---|---|---|
committer | Thomas Grill <xovo@users.sourceforge.net> | 2005-04-19 20:55:56 +0000 |
commit | 2eaad01d335b72f78eb0d6344ac31fce46a82e68 (patch) | |
tree | a540a2e31d87ea6efe766b3dedbbf88351780449 /externals/grill/pool/source | |
parent | df0b641a8706a7ed912422b83be726b7f17cb82e (diff) |
more symbol escaping
better method for discriminating numbers and symbols - by Frank Barknecht
svn path=/trunk/; revision=2794
Diffstat (limited to 'externals/grill/pool/source')
-rw-r--r-- | externals/grill/pool/source/pool.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/externals/grill/pool/source/pool.cpp b/externals/grill/pool/source/pool.cpp index 23f5edbc..c2c0de6a 100644 --- a/externals/grill/pool/source/pool.cpp +++ b/externals/grill/pool/source/pool.cpp @@ -514,7 +514,14 @@ static char *ReadAtom(char *c,A *a) float fres; // first try float +#if 0 if(!issymbol && sscanf(tmp,"%f",&fres) == 1) { +#else + char *endp; + // see if it's a float - thanks to Frank Barknecht + fres = (float)strtod(tmp,&endp); + if(!issymbol && !*endp && endp != tmp) { +#endif if(a) { int ires = (int)fres; // try a cast if(fres == ires) |