From 93163cb1d3f65f97abe3eb38239b04ef551cc042 Mon Sep 17 00:00:00 2001 From: Mike Smith Date: Thu, 7 Sep 2000 13:23:44 +0000 Subject: [PATCH] Backport of sqrt() domain fix to mainline. svn path=/trunk/vorbis/; revision=675 --- lib/psy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/psy.c b/lib/psy.c index 6de47f2..ed3718b 100644 --- a/lib/psy.c +++ b/lib/psy.c @@ -12,7 +12,7 @@ ******************************************************************** function: psychoacoustics not including preecho - last mod: $Id: psy.c,v 1.27 2000/08/31 08:01:34 xiphmont Exp $ + last mod: $Id: psy.c,v 1.28 2000/09/07 13:23:44 msmith Exp $ ********************************************************************/ @@ -623,6 +623,7 @@ void _vp_compute_mask(vorbis_look_psy *p,double *f, acc-=prev*prev; prev=this; } + if(acc<0)acc=0; /* in case it happens on the final iteration */ smooth[n-1]=sqrt(acc); } -- 2.7.4