There seems to be a bug in Modulator_2d for it++
3.10.5. An assertion is obtained if one tries to
instantiate the class without any arguments, i.e.,
This bug was not present in it++3.10.2 and seems to be
due to the line
k = needed_bits(M - 1);
in Modulator_2d::set(...) function. The problem is
that M - 1 is equal to zero when no arguments to the
constructor are given. k is then set to 1 and the
function calculate_softbit_matricies gives an
assertion. To fix this is I modified the above line to
if(M == 1) k = 0; else k = needed_bits(M - 1);
I think it can be questioned whether needed_bits()
really should return 1 when it's argument is zero, but
I did not dare to change that function since it may
affect lots of other functionality.
I have noticed that the modulator classes currently go
through a lot of modifications so maybe this bug is
not present anymore, but it doesn't hurt checking...
Log in to post a comment.