|
@@ -585,7 +585,8 @@ DatabaseClient::Finder::findWildcardMatch(
|
|
|
WantedTypes final_types(FINAL_TYPES());
|
|
|
final_types.insert(type);
|
|
|
|
|
|
- for (size_t i = 1; i <= (name.getLabelCount() - dresult.last_known); ++i) {
|
|
|
+ const size_t remove_labels = name.getLabelCount() - dresult.last_known;
|
|
|
+ for (size_t i = 1; i <= remove_labels; ++i) {
|
|
|
|
|
|
// Strip off the left-more label(s) in the name and replace with a "*".
|
|
|
const Name superdomain(name.split(i));
|