From 87cf0208484b33d3194add9570b936998b44e9a3 Mon Sep 17 00:00:00 2001 From: Calvin Morrison Date: Thu, 31 Oct 2013 14:40:37 -0400 Subject: fix memset --- src/c/kmer_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/c') diff --git a/src/c/kmer_utils.c b/src/c/kmer_utils.c index 3c2a4cd..08463a2 100644 --- a/src/c/kmer_utils.c +++ b/src/c/kmer_utils.c @@ -80,7 +80,7 @@ unsigned long long * get_kmer_counts_from_file(const char *fn, const unsigned in // malloc our return array unsigned long long * counts = malloc((width+ 1) * sizeof(unsigned long long)); - memset(counts, 0, width); + memset(counts, 0, width * sizeof(unsigned long long)); if(counts == NULL) { fprintf(stderr, strerror(errno)); exit(EXIT_FAILURE); -- cgit v1.2.3