diff options
author | Elliott Sales de Andrade <quantum.analyst@gmail.com> | 2019-01-04 18:51:52 -0500 |
---|---|---|
committer | Elliott Sales de Andrade <quantum.analyst@gmail.com> | 2019-01-04 18:51:52 -0500 |
commit | c2c1ba77fefa98764ff461bb67563d57937e0059 (patch) | |
tree | 6340ef0cacbf9b8d27a024aa1184caf5481dd413 | |
parent | 4b64bbe1c792c0b0f40d97bb98e4192e28923ca2 (diff) | |
download | cython-c2c1ba77fefa98764ff461bb67563d57937e0059.tar.gz |
Fix crash in lvalue_refs test.
Accessing the first element of a `std::vector` that is empty results in
a crash.
-rw-r--r-- | tests/run/lvalue_refs.pyx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/run/lvalue_refs.pyx b/tests/run/lvalue_refs.pyx index 7e3b4df28..d42f2407e 100644 --- a/tests/run/lvalue_refs.pyx +++ b/tests/run/lvalue_refs.pyx @@ -15,7 +15,7 @@ cdef void foo(vector[dpp] &bar, vector[vector[dp]] &baz) nogil: def test_lvalue_ref_assignment(): cdef vector[dpp] bar cdef vector[vector[dp]] baz - cdef vector[double] data + cdef vector[double] data = [0.0] cdef dp bongle = &data[0] bar.resize(1) |