]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Oops... Need to clear c_error before calling c_quot().
authorGuido van Rossum <guido@python.org>
Thu, 12 Sep 1996 21:02:02 +0000 (21:02 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 12 Sep 1996 21:02:02 +0000 (21:02 +0000)
Objects/complexobject.c

index b44039cfc91c967ab41d12ce379a76cd772b97e6..e7d0898a7bef742fc3863c8c35496616aebacaaa 100644 (file)
@@ -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()");