Commit a4e95bd0 authored by Samuel Debionne's avatar Samuel Debionne
Browse files

Merge branch 'max_buffer_fix' into 'master'

ctbuffer: fixed overflow.

See merge request !199
parents 4b5fae14 11bba2d6
Pipeline #50111 passed with stages
in 22 minutes and 41 seconds
......@@ -152,7 +152,8 @@ void CtBuffer::getMaxNumber(long& nb_buffers) const
{
int max_nbuffers;
m_hw_buffer->getMaxNbBuffers(max_nbuffers);
max_nbuffers = int(max_nbuffers * m_pars.maxMemory / 100.);
double maxMemory = double(m_pars.maxMemory) / 100.;
max_nbuffers = int(double(max_nbuffers) * maxMemory);
nb_buffers = max_nbuffers;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment