diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2022-04-27 17:18:23 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2022-04-27 17:18:37 +0300 |
commit | f3d5114c41352161d0dad7f30ef6b7dd1f28df85 (patch) | |
tree | abe2668a653eaeaccff3fefff39620b99715c9f9 /source/blender/nodes | |
parent | ce115a27862dcffff0c407b0a439b66aadb82398 (diff) |
Fix T93285: Wrong instance order when instancing a collection
At least on the Mac, `std::sort` sometimes passes the same value in the
`a` and `b` parameters.
The `true` return is only for cases where `a` is less than `b`.
Diffstat (limited to 'source/blender/nodes')
-rw-r--r-- | source/blender/nodes/geometry/nodes/node_geo_collection_info.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_collection_info.cc b/source/blender/nodes/geometry/nodes/node_geo_collection_info.cc index 68d42444afd..54a061993a3 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_collection_info.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_collection_info.cc @@ -120,7 +120,7 @@ static void node_geo_exec(GeoNodeExecParams params) std::sort(entries.begin(), entries.end(), [](const InstanceListEntry &a, const InstanceListEntry &b) { - return BLI_strcasecmp_natural(a.name, b.name) <= 0; + return BLI_strcasecmp_natural(a.name, b.name) < 0; }); for (const InstanceListEntry &entry : entries) { instances.add_instance(entry.handle, entry.transform); |