diff options
author | Elliott Sales de Andrade <quantum.analyst@gmail.com> | 2019-01-04 18:51:52 -0500 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2019-01-05 10:55:32 +0100 |
commit | e80187b99ca6d247a2213ba2794f058e62a8e8a7 (patch) | |
tree | 04c66cf41e8b53bd7d0f6b471af689a3ccdb7a18 | |
parent | 4d0418738671317cdd4d558808601b6a8e2b2daa (diff) | |
download | cython-e80187b99ca6d247a2213ba2794f058e62a8e8a7.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) |