From: Monty Date: Tue, 26 Feb 2002 05:21:35 +0000 (+0000) Subject: fix a one-off in a guard check during setup. X-Git-Tag: v1.3.3~809 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=48e5deaf3c06fcc60dfc138f3a6ce8166bfc266a;p=platform%2Fupstream%2Flibvorbis.git fix a one-off in a guard check during setup. svn path=/trunk/vorbis/; revision=3098 --- 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;