1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Fix for out of bounds LED index in BlocksDrawing example

This commit is contained in:
ed 2017-01-31 15:48:46 +00:00
parent e040353898
commit cb287f37e3

View file

@ -108,7 +108,8 @@ public:
/** Sets the colour of one of the LEDComponents */
void setLEDColour (int x, int y, Colour c)
{
jassert (isPositiveAndBelow (x, 15) && isPositiveAndBelow (y, 15));
x = jmin (x, 14);
y = jmin (y, 14);
leds.getUnchecked ((x * 15) + y)->setColour (c);
}