mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-06-18 19:19:29 +01:00
Fix #14333, 20d83677eb
: Incorrect change from index to range iteration. (#14335)
This commit is contained in:
parent
938acbe6ef
commit
a6de925ba6
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user