mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Merge pull request #110 from cinaera/pr_editor
Check array boundary for shape type
This commit is contained in:
commit
fd50cd1698
|
@ -635,6 +635,8 @@ int CEditor::PopupSource(CEditor *pEditor, CUIRect View)
|
|||
"Circle"
|
||||
};
|
||||
|
||||
pSource->m_Shape.m_Type = pSource->m_Shape.m_Type%CSoundShape::NUM_SHAPES; // prevent out of array errors
|
||||
|
||||
if(pEditor->DoButton_Editor(&s_ShapeTypeButton, s_aShapeNames[pSource->m_Shape.m_Type], 0, &ShapeButton, 0, "Change shape"))
|
||||
{
|
||||
pSource->m_Shape.m_Type = (pSource->m_Shape.m_Type+1)%CSoundShape::NUM_SHAPES;
|
||||
|
|
Loading…
Reference in a new issue