Oops... this bug was found by Ming Wu <mingwu@cyberon.com.tw>
authorjm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800>
Thu, 19 Dec 2002 04:07:08 +0000 (04:07 +0000)
committerjm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800>
Thu, 19 Dec 2002 04:07:08 +0000 (04:07 +0000)
git-svn-id: http://svn.xiph.org/trunk/speex@4157 0101bb08-14d6-0310-b084-bc0e0c8e3800

libspeex/lsp.c

index d1bdfbc..7cd7c22 100644 (file)
@@ -315,7 +315,7 @@ void lsp_enforce_margin(float *lsp, int len, float margin)
    if (lsp[0]<margin)
       lsp[0]=margin;
    if (lsp[len-1]>M_PI-margin)
-      lsp[len]=margin;
+      lsp[len-1]=M_PI-margin;
    for (i=1;i<len-1;i++)
    {
       if (lsp[i]<lsp[i-1]+margin)