Demystify plugin would have crashed ...

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13928 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Kevin Ferrare 2007-07-19 04:28:10 +00:00
parent e68a2e6c41
commit 9fe6e0214f

View file

@ -52,7 +52,8 @@ const struct button_mapping *plugin_contexts[]
remote_directions
#endif
};
#define NB_ACTION_CONTEXTS \
sizeof(plugin_contexts)/sizeof(struct button_mapping*)
#ifdef HAVE_LCD_COLOR
struct line_color
{
@ -380,8 +381,8 @@ int plugin_main(void)
rb->yield();
else
rb->sleep(sleep_time);
action = pluginlib_getaction(rb, TIMEOUT_NOBLOCK, plugin_contexts, 3);
action = pluginlib_getaction(rb, TIMEOUT_NOBLOCK,
plugin_contexts, NB_ACTION_CONTEXTS);
switch(action)
{
case DEMYSTIFY_QUIT: