From a6de925ba648e31c4a5beeb5f0c52e798bb08c62 Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Fri, 6 Jun 2025 17:57:26 +0100 Subject: [PATCH] Fix #14333, 20d83677eb: Incorrect change from index to range iteration. (#14335) --- src/network/network_content.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/network/network_content.cpp b/src/network/network_content.cpp index 68cb8e8d26..552764722f 100644 --- a/src/network/network_content.cpp +++ b/src/network/network_content.cpp @@ -937,11 +937,11 @@ void ClientNetworkContentSocketHandler::ReverseLookupTreeDependency(ConstContent /* First find all direct parents. We can't use the "normal" iterator as * we are including stuff into the vector and as such the vector's data - * store can be reallocated (and thus move), which means out iterating + * store can be reallocated (and thus move), which means our iterating * pointer gets invalid. So fall back to the indices. */ - for (const ContentInfo *ci : tree) { + for (size_t i = 0; i < tree.size(); i++) { ConstContentVector parents; - this->ReverseLookupDependency(parents, *ci); + this->ReverseLookupDependency(parents, *tree[i]); for (const ContentInfo *ci : parents) { include(tree, ci);