diff -r abe0c5a78d68 Modules/audioop.c --- a/Modules/audioop.c Thu May 28 17:10:29 2015 -0400 +++ b/Modules/audioop.c Thu May 28 15:42:56 2015 -0700 @@ -1331,7 +1331,7 @@ /* divide weightA and weightB by their greatest common divisor */ d = gcd(weightA, weightB); weightA /= d; - weightA /= d; + weightB /= d; if ((size_t)nchannels > PY_SIZE_MAX/sizeof(int)) { PyErr_SetString(PyExc_MemoryError,