From 48e5deaf3c06fcc60dfc138f3a6ce8166bfc266a Mon Sep 17 00:00:00 2001 From: Monty Date: Tue, 26 Feb 2002 05:21:35 +0000 Subject: [PATCH] fix a one-off in a guard check during setup. svn path=/trunk/vorbis/; revision=3098 --- lib/floor0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/floor0.c b/lib/floor0.c index 846e530..cbb9cc6 100644 --- a/lib/floor0.c +++ b/lib/floor0.c @@ -11,7 +11,7 @@ ******************************************************************** function: floor backend 0 implementation - last mod: $Id: floor0.c,v 1.50 2002/01/22 08:06:06 xiphmont Exp $ + last mod: $Id: floor0.c,v 1.51 2002/02/26 05:21:35 xiphmont Exp $ ********************************************************************/ @@ -181,7 +181,7 @@ static vorbis_look_floor *floor0_look (vorbis_dsp_state *vd,vorbis_info_mode *mi for(j=0;jn;j++){ int val=floor( toBARK((info->rate/2.f)/look->n*j) *scale); /* bark numbers represent band edges */ - if(val>=look->ln)val=look->ln; /* guard against the approximation */ + if(val>=look->ln)val=look->ln-1; /* guard against the approximation */ look->linearmap[j]=val; } look->linearmap[j]=-1; -- 2.7.4