Fixed bug in Palette::toAllegro(): Index out of range.

This commit is contained in:
David Capello 2010-05-30 10:48:17 -03:00
parent 69bad938de
commit 018aeffa47

View File

@ -244,7 +244,7 @@ void Palette::makeRectRamp(int from, int to, int columns)
void Palette::toAllegro(RGB *rgb) const
{
int i;
for (i=0; i<256; ++i) {
for (i=0; i<size(); ++i) {
rgb[i].r = _rgba_getr(m_colors[i]) / 4;
rgb[i].g = _rgba_getg(m_colors[i]) / 4;
rgb[i].b = _rgba_getb(m_colors[i]) / 4;