diff --git a/libcelt/celt.c b/libcelt/celt.c index a0c83f22c29b5e6240b037acc0a0e98b4f34cd56..ad4ef60130c1e801c606ac1bc2c85c7f1fe86243 100644 --- a/libcelt/celt.c +++ b/libcelt/celt.c @@ -839,7 +839,7 @@ static int alloc_trim_analysis(const CELTMode *m, const celt_norm *X, { diff += bandLogE[i+c*m->nbEBands]*(opus_int32)(2+2*i-m->nbEBands); } - } while (++c<0); + } while (++c<C); diff /= C*(end-1); /*printf("%f\n", diff);*/ if (diff > QCONST16(2.f, DB_SHIFT)) @@ -2364,10 +2364,6 @@ int celt_decode_with_ec_float(CELTDecoder * restrict st, const unsigned char *da RESTORE_STACK; return frame_size/st->downsample; } - if (len<0) { - RESTORE_STACK; - return CELT_BAD_ARG; - } if (dec == NULL) {