mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Fix first value in graphs being incorrect
As the index was incremented before setting the value, the value at index 0 was not set correctly until the ringbuffer wraps around.
This commit is contained in:
parent
dc7fa1fbb2
commit
fb96217147
|
@ -38,8 +38,8 @@ void CGraph::Scale()
|
|||
|
||||
void CGraph::Add(float Value, ColorRGBA Color)
|
||||
{
|
||||
m_Index = (m_Index + 1) % MAX_VALUES;
|
||||
InsertAt(m_Index, Value, Color);
|
||||
m_Index = (m_Index + 1) % MAX_VALUES;
|
||||
}
|
||||
|
||||
void CGraph::InsertAt(size_t Index, float Value, ColorRGBA Color)
|
||||
|
|
Loading…
Reference in a new issue