diff --git a/makefile b/makefile index 4d752aa..10afcde 100644 --- a/makefile +++ b/makefile @@ -2,7 +2,7 @@ LOCPATH = ./bin INSTALLPATH = /usr/local CFLAGS = -O3 -LFLAGS = -lm -lncursesw -ldl #-ltinfo #-lasound +LFLAGS = -lm -lncurses -ldl -ltinfo #-lasound DEBFLAGS = -g -Wall NAME = mvc diff --git a/src/fft.c b/src/fft.c index 1c2c76a..6bdbd61 100644 --- a/src/fft.c +++ b/src/fft.c @@ -4,11 +4,13 @@ /* if flag is EVEN (0), it takes only the even elements * otherwise if flag is ODD (1) it takes only the odd ones */ -cplx *split_array(cplx *a, int len, int flag) +cplx *split_array(cplx *a, const int len, const int flag) { int i, cnt = 0; cplx *ret = malloc((len/2)*sizeof(cplx)); + if(!ret) return NULL; + for(i=0+flag; i