fix vector-move-right! and vector-move-left!
authorAndy Wingo <wingo@pobox.com>
Wed, 4 Aug 2010 19:48:00 +0000 (21:48 +0200)
committerAndy Wingo <wingo@pobox.com>
Wed, 4 Aug 2010 19:48:00 +0000 (21:48 +0200)
commit551b96d294f3b09c37124562e3da64a7bd399666
treef5aee2624b5827c2ecc2d056ec63b1272a96a703
parentf9560a348e83ec3c494aee0d42b056383392ffca
fix vector-move-right! and vector-move-left!

* libguile/vectors.c (scm_vector_move_left_x, scm_vector_move_right_x):
  Fix some bugs reported by Michael Lucy -- both variants would happily
  write beyond the end, and vector-move-right! didn't increment the
  counter before copying in the reverse direction.

* test-suite/tests/vectors.test ("vector-move-left!"):
  ("vector-move-right!"): Add tests.
libguile/vectors.c
test-suite/tests/vectors.test