From 396103a699e2b71d501e282457c2e52faf3d9e95 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Mon, 18 Mar 2013 10:46:42 -0500 Subject: [PATCH] src/fvec.c: fvec_copy: only get min if needed --- src/fvec.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/fvec.c b/src/fvec.c index 345a7f87..ea33b581 100644 --- a/src/fvec.c +++ b/src/fvec.c @@ -87,13 +87,13 @@ void fvec_weight(fvec_t *s, fvec_t *weight) { void fvec_copy(fvec_t *s, fvec_t *t) { uint_t j; - uint_t length = MIN(s->length, t->length); + uint_t length = t->length; if (s->length != t->length) { - AUBIO_WRN("trying to copy %d elements to %d elements \n", - s->length, t->length); + AUBIO_WRN("trying to copy %d elements to %d elements \n", + s->length, t->length); + length = MIN(s->length, t->length); } for (j=0; j< length; j++) { t->data[j] = s->data[j]; } } - -- 2.26.2