| changeset 4327 | 60e4042f2589 |
| parent 3913 | a73cf1f26984 |
| child 4328 | a92c3f9c0744 |
1.1 --- a/core/sm_stringutil.cpp Sun Apr 20 00:37:20 2014 -0500 1.2 +++ b/core/sm_stringutil.cpp Tue Apr 22 19:40:45 2014 -0700 1.3 @@ -213,6 +213,11 @@ 1.4 int significant_digits = 0; // number of significant digits written 1.5 const int MAX_SIGNIFICANT_DIGITS = 16; 1.6 1.7 + if (isnan(fval)) { 1.8 + AddString(buf_p, maxlen, "NaN", width, prec); 1.9 + return; 1.10 + } 1.11 + 1.12 // default precision 1.13 if (prec < 0) 1.14 {