Ticket #1813: infnan_cast.patch

File infnan_cast.patch, 0.9 KB (added by plobsing, 11 years ago)
  • src/spf_render.c

     
    830830                                obj->getfloat(interp, info.type, obj); 
    831831 
    832832                            /* check for Inf and NaN values */ 
    833                             if (thefloat == PARROT_FLOATVAL_INF_POSITIVE) { 
     833                            if (thefloat == (HUGEFLOATVAL)(float)PARROT_FLOATVAL_INF_POSITIVE) { 
    834834                                ts = cstr2pstr(PARROT_CSTRING_INF_POSITIVE); 
    835835                            } 
    836                             else if (thefloat == PARROT_FLOATVAL_INF_NEGATIVE) { 
     836                            else if (thefloat == (HUGEFLOATVAL)(float)PARROT_FLOATVAL_INF_NEGATIVE) { 
    837837                                ts = cstr2pstr(PARROT_CSTRING_INF_NEGATIVE); 
    838838                            } 
    839839                            else if (thefloat != thefloat) {