X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/a63c83a55c527e6e95c92cf2ef65ae575902387e..12442080c860b7affd1b246f12895bda4f304330:/src/xbt/xbt_matrix.c diff --git a/src/xbt/xbt_matrix.c b/src/xbt/xbt_matrix.c index 0238b479c7..ff2c3c8246 100644 --- a/src/xbt/xbt_matrix.c +++ b/src/xbt/xbt_matrix.c @@ -7,6 +7,7 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ +#include #include "xbt/sysdep.h" #include "xbt/log.h" #include "xbt/matrix.h" @@ -132,7 +133,7 @@ void xbt_matrix_copy_values(xbt_matrix_t dst, xbt_matrix_t src, xbt_matrix_t xbt_matrix_double_new_zeros(int lines, int rows) { xbt_matrix_t res = xbt_matrix_new(lines, rows,sizeof(double),NULL); - memset(res->data,0,sizeof(res->data)); + memset(res->data,0, res->elmsize * res->lines * res->rows); return res; }