aboutsummaryrefslogtreecommitdiff
path: root/externals/grill
diff options
context:
space:
mode:
Diffstat (limited to 'externals/grill')
-rw-r--r--externals/grill/pool/readme.txt1
-rw-r--r--externals/grill/pool/source/pool.cpp7
2 files changed, 8 insertions, 0 deletions
diff --git a/externals/grill/pool/readme.txt b/externals/grill/pool/readme.txt
index 42103fa6..df5787c5 100644
--- a/externals/grill/pool/readme.txt
+++ b/externals/grill/pool/readme.txt
@@ -85,6 +85,7 @@ Version history:
- enhanced and optimized atom parsing
- escaped symbols (with \) for whitespace support on store and load
- escape symbols also with "" to help the load routine
+- improved reading of legacy data by Frank Barknecht
0.2.0:
- attributes (pool,private,echodir,absdir)
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)