From: Guido van Rossum Date: Thu, 12 Sep 1996 21:02:02 +0000 (+0000) Subject: Oops... Need to clear c_error before calling c_quot(). X-Git-Tag: v1.4~200 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=24048580ca44130cf6250abded6d9592c7befaa8;p=thirdparty%2FPython%2Fcpython.git Oops... Need to clear c_error before calling c_quot(). --- diff --git a/Objects/complexobject.c b/Objects/complexobject.c index b44039cfc91c..e7d0898a7bef 100644 --- a/Objects/complexobject.c +++ b/Objects/complexobject.c @@ -376,6 +376,7 @@ complex_remainder(v, w) complexobject *w; { Py_complex div, mod; + c_error = 0; div = c_quot(v->cval,w->cval); /* The raw divisor value. */ if (c_error == 1) { err_setstr(ZeroDivisionError, "complex remainder"); @@ -396,6 +397,7 @@ complex_divmod(v, w) { Py_complex div, mod; PyObject *d, *m, *z; + c_error = 0; div = c_quot(v->cval,w->cval); /* The raw divisor value. */ if (c_error == 1) { err_setstr(ZeroDivisionError, "complex divmod()");