AP_Param: nested group recursion into next_group disableable by macro

* c.f. 0251932c81fe7eb, e5515bb6ef82
This commit is contained in:
Pat Hickey 2012-02-29 19:48:43 -08:00
parent 8b3d013294
commit 8fa559930f

View File

@ -719,6 +719,7 @@ AP_Param *AP_Param::next_group(uint8_t vindex, const struct GroupInfo *group_inf
for (uint8_t i=0;
(type=(enum ap_var_type)PGM_UINT8(&group_info[i].type)) != AP_PARAM_NONE;
i++) {
#ifdef AP_NESTED_GROUPS_ENABLED
if (type == AP_PARAM_GROUP) {
// a nested group
const struct GroupInfo *ginfo = (const struct GroupInfo *)PGM_POINTER(&group_info[i].group_info);
@ -728,7 +729,9 @@ AP_Param *AP_Param::next_group(uint8_t vindex, const struct GroupInfo *group_inf
if (ap != NULL) {
return ap;
}
} else {
} else
#endif // AP_NESTED_GROUPS_ENABLED
{
if (*found_current) {
// got a new one
token->key = vindex;