--- htk_3.4.2/HTKLib/HAdapt.c 2009-11-22 11:57:21.461000000 +0000 +++ htk_3.4.1/HTKLib/HAdapt.c 2009-03-12 18:41:39.000000000 +0000 @@ -97,7 +97,6 @@ int baseclass; DVector bVector; TriMat *bTriMat; - Boolean resetbTriMat; struct _AccCache *next; } AccCache; /* acc cache to save accumulators related to parent XForm */ @@ -1037,7 +1036,8 @@ paac = GetPAAccCache(mp); if ( paac != NULL ) { - if ( paac->resetbTriMat ) { + /* This needs to be altered so that it does not rely on a non-zero first element */ + if ( paac->bTriMat[1][1][1] == 0 ) { nblock = (int)(paac->bTriMat[0]); for (bl=1,bstart=0;bl<=nblock;bl++) { m = paac->bTriMat[bl]; @@ -1048,7 +1048,6 @@ } bstart += bsize; } - paac->resetbTriMat=FALSE; } covar = mp->cov.var; for (i=1;i<=vsize;i++) { @@ -1159,7 +1158,6 @@ for (ac = headac; ac!= NULL; ac=ac->next) { ZeroDVector(ac->bVector); ZeroBlockTriMat(ac->bTriMat); - ac->resetbTriMat=TRUE; } } } @@ -1913,7 +1911,6 @@ ZeroDVector(ac->bVector); ac->bTriMat = CreateBlockTriMat(&acccaStack,size); ZeroBlockTriMat(ac->bTriMat); - ac->resetbTriMat=TRUE; ac->next = headac; headac = ac; return(ac);