2006-04-04 Eric Seidel <eseidel@apple.com>
authoreseidel <eseidel@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 4 Apr 2006 10:08:50 +0000 (10:08 +0000)
committereseidel <eseidel@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 4 Apr 2006 10:08:50 +0000 (10:08 +0000)
        Reviewed by mjs.

        * kjs/number_object.cpp:
        (NumberProtoFunc::callAsFunction): remove trunc() to fix win32.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@13677 268f45cc-cd09-0410-ab3c-d52691b4dbfc

JavaScriptCore/ChangeLog
JavaScriptCore/kjs/number_object.cpp

index d97ebae9c71e5ee3560aa9babfbc275d6042e94b..cd40925a141c4e5e5d0ec7c1a2d3f6e49bf7df10 100644 (file)
@@ -1,3 +1,10 @@
+2006-04-04  Eric Seidel  <eseidel@apple.com>
+
+        Reviewed by mjs.
+
+        * kjs/number_object.cpp:
+        (NumberProtoFunc::callAsFunction): remove trunc() to fix win32.
+
 2006-03-12  Maciej Stachowiak  <mjs@apple.com>
 
         Reviewed by Darin.
 2006-03-12  Maciej Stachowiak  <mjs@apple.com>
 
         Reviewed by Darin.
index cd039580998ae8f9720e37cc9cba4ab11872daa5..7982502ec83382244bb40d4c8ebfa8d67151ec9c 100644 (file)
@@ -365,7 +365,7 @@ JSValue *NumberProtoFunc::callAsFunction(ExecState *exec, JSObject *thisObj, con
       int p = (int)dp;
       
       if (x != 0) {
       int p = (int)dp;
       
       if (x != 0) {
-          e = static_cast<int>(trunc(log10(x)));
+          e = static_cast<int>(log10(x));
           double tens = intPow10(e - p + 1);
           double n = floor(x / tens);
           if (n < intPow10(p - 1)) {
           double tens = intPow10(e - p + 1);
           double n = floor(x / tens);
           if (n < intPow10(p - 1)) {