diff options
author | Ian Price <ianprice90@googlemail.com> | 2011-02-14 03:44:31 +0000 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2011-02-14 20:19:15 +0100 |
commit | ca65967360ba9d9564435b9c16839cea8b69a9a6 (patch) | |
tree | 9c0d81040561c26bec8a2b186bd93a24231eb978 /libguile/vectors.c | |
parent | 533d8212af5476764a465a2814869172a32a9ead (diff) | |
download | guile-ca65967360ba9d9564435b9c16839cea8b69a9a6.tar.gz |
fix fencepost error in vector-move-left! and -right!
* libguile/vectors.c (scm_vector_move_right_x, scm_vector_move_left_x):
Fix edge case.
Diffstat (limited to 'libguile/vectors.c')
-rw-r--r-- | libguile/vectors.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libguile/vectors.c b/libguile/vectors.c index f9b4fc2fd..2ab5b78ea 100644 --- a/libguile/vectors.c +++ b/libguile/vectors.c @@ -533,7 +533,7 @@ SCM_DEFINE (scm_vector_move_left_x, "vector-move-left!", 5, 0, 0, i = scm_to_unsigned_integer (start1, 0, len1); e = scm_to_unsigned_integer (end1, i, len1); - SCM_ASSERT_RANGE (SCM_ARG3, end1, (e-i) < len2); + SCM_ASSERT_RANGE (SCM_ARG3, end1, (e-i) <= len2); j = scm_to_unsigned_integer (start2, 0, len2); SCM_ASSERT_RANGE (SCM_ARG5, start2, j <= len2 - (e - i)); @@ -573,7 +573,7 @@ SCM_DEFINE (scm_vector_move_right_x, "vector-move-right!", 5, 0, 0, i = scm_to_unsigned_integer (start1, 0, len1); e = scm_to_unsigned_integer (end1, i, len1); - SCM_ASSERT_RANGE (SCM_ARG3, end1, (e-i) < len2); + SCM_ASSERT_RANGE (SCM_ARG3, end1, (e-i) <= len2); j = scm_to_unsigned_integer (start2, 0, len2); SCM_ASSERT_RANGE (SCM_ARG5, start2, j <= len2 - (e - i)); |