diff dsp/segmentation/cluster_segmenter.c @ 41:6fc20388d29e

* Avoid uninitialised values in histogram when running with (pathologically?) small frame count
author cannam
date Fri, 01 Feb 2008 16:46:29 +0000
parents 8bdbda7fb893
children d72fcd34d9a7
line wrap: on
line diff
--- a/dsp/segmentation/cluster_segmenter.c	Fri Feb 01 16:45:49 2008 +0000
+++ b/dsp/segmentation/cluster_segmenter.c	Fri Feb 01 16:46:29 2008 +0000
@@ -87,6 +87,10 @@
 {
 	int i, j, t;
 	double norm;
+
+	for (i = 0; i < nx*m; i++) 
+	        h[i] = 0;
+
 	for (i = hlen/2; i < nx-hlen/2; i++)
 	{
 		for (j = 0; j < m; j++)