kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #02917
Crash changing color
-
To:
kicad-devel@xxxxxxxxxxxxxxx
-
From:
"Marco Serantoni" <marco.serantoni@...>
-
Date:
Wed, 08 Jul 2009 19:15:37 -0000
-
User-agent:
eGroups-EW/0.82
Seems that the ColorRef is overruned in WinEDA_SelColorFrame::WinEDA_SelColorFrame.
I propose this change to avoid to get out of bounds of the array.
--
Marco
Index: selcolor.cpp
===================================================================
--- selcolor.cpp (revision 1863)
+++ selcolor.cpp (working copy)
@@ -98,7 +98,7 @@
MainBoxSizer = new wxBoxSizer( wxHORIZONTAL );
OuterBoxSizer->Add( MainBoxSizer, 1, wxGROW | wxLEFT | wxRIGHT | wxTOP, 5 );
- for( ii = 0; ColorRefs[ii].m_Name != NULL; ii++ )
+ for( ii = 0; ColorRefs[ii].m_Name != NULL && ii < NBCOLOR; ii++ )
{
// Provide a separate column for every eight buttons (and their
// associated text strings), so provide a FlexGrid Sizer with