# # # patch "policies/policy_branch.cc" # from [168dd85997a7a63feb42cf041fabc72200d393db] # to [77a6f8d73186af27ba934387c043cdd189f448dc] # ============================================================ --- policies/policy_branch.cc 168dd85997a7a63feb42cf041fabc72200d393db +++ policies/policy_branch.cc 77a6f8d73186af27ba934387c043cdd189f448dc @@ -57,11 +57,11 @@ namespace { } const_dir_t dir = downcast_to_dir_t(n); i = dir->children.begin(); + end = dir->children.end(); while (i != end && !is_file_t(i->second)) { ++i; } - end = dir->children.end(); if ((bool)*this) { get(value.first, value.second); @@ -83,6 +83,8 @@ namespace { } void get(string & name, data & contents) const { + if (!(bool)*this) + return; name = i->first(); file_t f = downcast_to_file_t(i->second); file_data fdat;