An overflow might happen when the value of max_samples is too big causing liblsl to raise an exception when checking if it is a multiple of n_channels.
In our case max_samples was 2280000000 which was passed as a negative value to the lib.
This PR fixes the problem by casting it to the correct type: size_t.
An overflow might happen when the value of
max_samples
is too big causingliblsl
to raise an exception when checking if it is a multiple ofn_channels
.In our case
max_samples
was2280000000
which was passed as a negative value to the lib.This PR fixes the problem by casting it to the correct type:
size_t
.