From 50451eb91232b0e90c677419db19ed7b33a698a9 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sat, 30 May 2015 00:53:26 +0300 Subject: Issue #24326: Fixed audioop.ratecv() with non-default weightB argument. Original patch by David Moore. --- Modules/audioop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Modules/audioop.c') diff --git a/Modules/audioop.c b/Modules/audioop.c index 2d287f249b..0358147f92 100644 --- a/Modules/audioop.c +++ b/Modules/audioop.c @@ -1320,7 +1320,7 @@ audioop_ratecv_impl(PyModuleDef *module, Py_buffer *fragment, int width, int nch /* 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, -- cgit v1.2.1