Changeset 2168 in webkit for trunk/JavaScriptCore/kjs


Ignore:
Timestamp:
Sep 25, 2002, 3:46:33 PM (23 years ago)
Author:
hyatt
Message:

Fix the impls of min/max to not use +inf/-inf when you have
arguments. Technically there's still a bug here for the no
argument case, probably caused by a screwup when +inf/-inf are
converted to doubles.

  • kjs/math_object.cpp: (MathFuncImp::call):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/math_object.cpp

    r1799 r2168  
    183183      if ( isNaN( val ) )
    184184      {
    185         result = NaN;
     185            result = NaN;
    186186        break;
    187187      }
    188       if ( val > result )
     188      // Comparing a number to negative infinity doesn't work. 
     189      // -dwh
     190      if ( k == 0 || val > result )
    189191        result = val;
    190192    }
     
    201203        break;
    202204      }
    203       if ( val < result )
     205      // Comparing a number to positive infinity doesn't work. 
     206      // -dwh
     207      if ( k == 0 || val < result )
    204208        result = val;
    205209    }
Note: See TracChangeset for help on using the changeset viewer.