From 0239a3c9a1409e3b9a7950018dd8bb742c2ea457 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ne=C4=8Dada?= Date: Wed, 2 Oct 2019 17:42:37 +0300 Subject: [PATCH] Fix memset size in Mie T-matrix generator. Former-commit-id: 244dad82dec42fdc1e08cc12205e373711465622 --- qpms/tmatrices.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qpms/tmatrices.c b/qpms/tmatrices.c index b4522cf..9b86c47 100644 --- a/qpms/tmatrices.c +++ b/qpms/tmatrices.c @@ -570,7 +570,7 @@ qpms_errno_t qpms_tmatrix_spherical_fill(qpms_tmatrix_t *t, ///< T-matrix whose qpms_l_t lMax = t->spec->lMax; complex double *miecoeffs = qpms_mie_coefficients_reflection(NULL, t->spec, a, k_i, k_e, mu_i, mu_e, QPMS_BESSEL_REGULAR, QPMS_HANKEL_PLUS); - memset(t->m, 0, SQ(t->spec->n)); + memset(t->m, 0, SQ(t->spec->n)*sizeof(complex double)); for(size_t i = 0; i < t->spec->n; ++i) t->m[t->spec->n*i + i] = miecoeffs[i]; free(miecoeffs);