Page MenuHomePhabricator

Bug in ColorSequenceRainbow
Closed, ResolvedPublic

Description

In mitk::ColorSequenceRainbow::GetNextColor() there is a bug that generates a crash the next call to GetNextColor() when m_ColorIndex is m_ColorList.size() -1.

I propose to change it with the following (correct) code:

m_Color = m_ColorList[m_ColorIndex];
m_ColorIndex = (m_ColorIndex + 1) % m_ColorList.size();

return m_Color;

Thank you