Skip to content

Commit 30b97a5

Browse files
committed
fix: Correct return statement in fft_convolve function to ensure proper resizing of output vector
1 parent 0a2678c commit 30b97a5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

weilycoder/poly/fft_convolve.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ std::vector<std::complex<float_t>> fft_convolve(std::vector<std::complex<float_t
2929
fft(a), fft(b);
3030
for (size_t i = 0; i < n; ++i)
3131
a[i] *= b[i];
32-
return fft<-1>(a), a;
32+
fft<-1>(a), a.resize(a.size() + b.size() - 1);
33+
return a;
3334
}
3435

3536
/**

0 commit comments

Comments
 (0)