Fix off-by-1 in Group::Remap.
This was introduced in bd84bc1a
and caused crashes with:
Assertion failed: hm.v != t->h.v.
This commit is contained in:
parent
cb0fdb1c28
commit
49a7f863b8
@ -718,7 +718,7 @@ hEntity Group::Remap(hEntity in, int copyNumber) {
|
|||||||
auto it = remap.find({ in, copyNumber });
|
auto it = remap.find({ in, copyNumber });
|
||||||
if(it == remap.end()) {
|
if(it == remap.end()) {
|
||||||
std::tie(it, std::ignore) =
|
std::tie(it, std::ignore) =
|
||||||
remap.insert({ { in, copyNumber }, { (uint32_t)remap.size() } });
|
remap.insert({ { in, copyNumber }, { (uint32_t)remap.size() + 1 } });
|
||||||
}
|
}
|
||||||
return h.entity(it->second.v);
|
return h.entity(it->second.v);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user