Kaydet (Commit) de429628 authored tarafından Mark Dickinson's avatar Mark Dickinson

Whoops. errno should only be tested when the result is finite.

üst a0de26c3
......@@ -188,10 +188,10 @@ math_1_to_whatever(PyObject *arg, double (*func) (double),
"math domain error (singularity)");
return NULL;
}
/* on most machines, errno should be 0 at this point */
if (errno && is_error(r))
if (Py_IS_FINITE(r) && errno && is_error(r))
/* this branch unnecessary on most platforms */
return NULL;
else
return (*from_double_func)(r);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment