fixed incorrect argument popping in exsltMathAtan2Function #541965
authorWilliam M. Brack <wbrack@src.gnome.org>
Sat, 12 Jul 2008 23:37:05 +0000 (23:37 +0000)
committerWilliam M. Brack <wbrack@src.gnome.org>
Sat, 12 Jul 2008 23:37:05 +0000 (23:37 +0000)
* libexslt/math.c: fixed incorrect argument popping in exsltMathAtan2Function #541965

svn path=/trunk/; revision=1483

ChangeLog
libexslt/math.c

index c11db6d..e5fecdd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sat Jul 12 16:36:58 PST 2008 William Brack <wbrack@mmm.com.hk>
+
+       * libexslt/math.c: fixed incorrect argument popping in
+         exsltMathAtan2Function #541965
+
 Thu Jul 10 10:04:28 PST 2008 William Brack <wbrack@mmm.com.hk>
 
        * libxslt/functions.c: patch from Ron Burk to fix problem
index 5c5720d..e56709b 100644 (file)
@@ -972,22 +972,22 @@ exsltMathAtan2 (double y, double x) {
  */
 static void
 exsltMathAtan2Function (xmlXPathParserContextPtr ctxt, int nargs) {
-    double ret, y;
+    double ret, x;
 
     if (nargs != 2) {
        xmlXPathSetArityError(ctxt);
        return;
     }
-    y = xmlXPathPopNumber(ctxt);
+    x = xmlXPathPopNumber(ctxt);
     if (xmlXPathCheckError(ctxt))
        return;
 
-    /* x */
+    /* y */
     ret = xmlXPathPopNumber(ctxt);
     if (xmlXPathCheckError(ctxt))
        return;
 
-    ret = exsltMathAtan2(y, ret);
+    ret = exsltMathAtan2(ret, x);
 
     xmlXPathReturnNumber(ctxt, ret);
 }