Fix typo in complex parsing code; expand tests.

This commit is contained in:
Mark Dickinson 2009-04-25 09:47:00 +00:00
parent 5083dc552b
commit 0a6501bf56
2 changed files with 20 additions and 4 deletions

View file

@ -962,7 +962,7 @@ complex_subtype_from_string(PyTypeObject *type, PyObject *v)
y = PyOS_ascii_strtod(s, &end);
if (end == s && errno == ENOMEM)
return PyErr_NoMemory();
if (errno == ERANGE && fabs(z) >= 1.0)
if (errno == ERANGE && fabs(y) >= 1.0)
goto overflow;
if (end != s)
/* <float><signed-float>j */