summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Horel <guillaume.horel@gmail.com>2020-01-24 15:01:21 -0500
committerGuillaume Horel <guillaume.horel@gmail.com>2020-01-24 15:01:21 -0500
commit0e7cb3ec59de876bd32dcb86606351b2baa61083 (patch)
tree248f6a02d01e5cc710183bda1c6a804b29025dc9
parent930eb6f01f0a2fbe5ed4e9c00fd78b069ac7f71a (diff)
downloadpyisda-0e7cb3ec59de876bd32dcb86606351b2baa61083.tar.gz
bugfix
-rw-r--r--pyisda/curve.pyx4
1 files changed, 2 insertions, 2 deletions
diff --git a/pyisda/curve.pyx b/pyisda/curve.pyx
index 6456477..ab74fde 100644
--- a/pyisda/curve.pyx
+++ b/pyisda/curve.pyx
@@ -707,7 +707,7 @@ cdef class SpreadCurve(Curve):
SpreadCurve instance = SpreadCurve.__new__(SpreadCurve)
const unsigned char* cursor
const char* src
- char* dst = <char*>malloc(500)
+ char* dst
TCurve* curve = <TCurve*>malloc(sizeof(TCurve))
size_t size
Py_buffer* py_buf
@@ -719,7 +719,7 @@ cdef class SpreadCurve(Curve):
size = py_buf.len
else:
src = <bytes?>state
- size = PyBytes_GET_SIZE(src)
+ size = PyBytes_GET_SIZE(state)
with nogil:
if compressed:
dst = <char*>malloc(500)