summaryrefslogtreecommitdiffstats
path: root/jv.c
diff options
context:
space:
mode:
authorStephen Dolan <mu@netsoc.tcd.ie>2012-12-28 16:08:29 +0000
committerStephen Dolan <mu@netsoc.tcd.ie>2012-12-28 16:08:29 +0000
commit79c9c418c6c6312c550b9253b62701f3f788dfa2 (patch)
treebbddd669b9c2daa61a8144fead798e1fa45e26f6 /jv.c
parentf1e23448e789983f8581f291e56a37c3c63e7dbf (diff)
Path manipulation (path/getpath/setpath/delpath) and docs.
del function should fix #37.
Diffstat (limited to 'jv.c')
-rw-r--r--jv.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/jv.c b/jv.c
index abbeb6d4..9a362a6c 100644
--- a/jv.c
+++ b/jv.c
@@ -254,8 +254,7 @@ static int jvp_array_equal(jv_complex* a, jv_complex* b) {
static jv_complex jvp_array_slice(jv_complex* a, int start, int end) {
// FIXME: maybe slice should reallocate if the slice is small enough
assert(start <= end);
- jvp_array* array = jvp_array_ptr(a);
- assert(a->i[1] + end < array->length);
+ assert(a->i[0] + end <= a->i[1]);
jv_complex slice = *a;
slice.i[0] += start;
slice.i[1] = slice.i[0] + (end - start);