From 7184a785f82ecd5aac8fe0830355e71d4614501b Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sun, 1 Oct 2023 23:17:57 +0300 Subject: [PATCH 57/57] Fix bitvector copy functions So far unused functions were copying either from or to wrong address See osdn #48772 Signed-off-by: Marko Lindqvist --- utility/bitvector.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utility/bitvector.c b/utility/bitvector.c index 7debd38ede..17a65411e6 100644 --- a/utility/bitvector.c +++ b/utility/bitvector.c @@ -225,7 +225,7 @@ void dbv_copy(struct dbv *dest, const struct dbv *src) dbv_resize(dest, src->bits); } - memcpy(&dest->vec, &src->vec, _BV_BYTES(src->bits)); + memcpy(&dest->vec, src->vec, _BV_BYTES(src->bits)); } /***********************************************************************//** @@ -234,7 +234,7 @@ void dbv_copy(struct dbv *dest, const struct dbv *src) ***************************************************************************/ void dbv_to_bv(unsigned char *dest, const struct dbv *src) { - memcpy(dest, &(src->vec), _BV_BYTES(src->bits)); + memcpy(dest, src->vec, _BV_BYTES(src->bits)); } /***********************************************************************//** @@ -243,7 +243,7 @@ void dbv_to_bv(unsigned char *dest, const struct dbv *src) ***************************************************************************/ void bv_to_dbv(struct dbv *dest, const unsigned char *src) { - memcpy(&(dest->vec), dest, _BV_BYTES(dest->bits)); + memcpy(dest->vec, dest, _BV_BYTES(dest->bits)); } /***********************************************************************//** -- 2.40.1