1
0
mirror of git://projects.qi-hardware.com/ben-blinkenlights.git synced 2024-09-29 00:20:43 +03:00

ubb-la/gui.c (gui): the upper bound for "pos" is nibbles-skip-1, not "nibbles"

This commit is contained in:
Werner Almesberger 2013-01-31 14:44:42 -03:00
parent 709506e6d6
commit f9b3c36c6b

View File

@ -460,8 +460,8 @@ void gui(const uint8_t *buf, int skip, int nibbles, double freq)
break;
case SDLK_RIGHT:
pos += pos_step(zoom);
if (pos > nibbles-1)
pos = nibbles-1;
if (pos > nibbles-skip-1)
pos = nibbles-skip-1;
break;
case SDLK_RETURN:
case SDLK_q: