Last fix to get_plugin in ikplugin_api.c was off by one in the wrong direction.

This commit is contained in:
Jason Wilkins 2012-11-13 11:31:54 +00:00
parent 590ed4feb1
commit 9a5cc8235a

@ -79,14 +79,14 @@ static IKPlugin ikplugin_tab[] = {
itasc_update_param,
itasc_test_constraint,
},
#endif
#endif
{ NULL }
};
static IKPlugin *get_plugin(bPose *pose)
{
if (!pose || pose->iksolver < 0 || pose->iksolver > (sizeof(ikplugin_tab) / sizeof(IKPlugin)))
if (!pose || pose->iksolver < 0 || pose->iksolver > (sizeof(ikplugin_tab)/sizeof(IKPlugin) - 2))
return NULL;
return &ikplugin_tab[pose->iksolver];