chiark / gitweb /
algorithms.c (ShakeNN.copy): Return the copy rather than the original.
[catacomb-python] / algorithms.c
index 24ebd748af9cbc58a562875f9885c8c61d3200e5..61459a1f977eb4ab4da72f51bcfb1a7270a68dca 100644 (file)
@@ -1880,7 +1880,7 @@ static PyObject *shakemeth_copy(PyObject *me, PyObject *arg)
   rc->h = *SHAKE_H(me);
   rc->st = SHAKE_ST(me);
 end:
-  return ((PyObject *)me);
+  return ((PyObject *)rc);
 }
 
 static PyObject *shakemeth_get(PyObject *me, PyObject *arg)