[Bf-blender-cvs] [2a09cc6d5e9] refactor-mesh-uv-map-generic: Don't shift with a value larger than the type.
Baardaap
noreply at git.blender.org
Thu Dec 15 23:06:48 CET 2022
Commit: 2a09cc6d5e9de746efd5783b8ebf1002a2792e04
Author: Baardaap
Date: Thu Dec 15 23:02:47 2022 +0100
Branches: refactor-mesh-uv-map-generic
https://developer.blender.org/rB2a09cc6d5e9de746efd5783b8ebf1002a2792e04
Don't shift with a value larger than the type.
When comparing customdata layers a flag was created from the type
by leftshifting a 1 by the type value. Because there are more than
32 types this needs to be a 64 bit value.
This fix was already in master, but mistakenly not merged.
===================================================================
M source/blender/blenkernel/intern/mesh.cc
===================================================================
diff --git a/source/blender/blenkernel/intern/mesh.cc b/source/blender/blenkernel/intern/mesh.cc
index ea8e896b118..dd324b6fa48 100644
--- a/source/blender/blenkernel/intern/mesh.cc
+++ b/source/blender/blenkernel/intern/mesh.cc
@@ -750,7 +750,7 @@ static int customdata_compare(
}
}
if (!found_corresponding_layer) {
- if ((1 << l1->type) & CD_MASK_PROP_ALL) {
+ if ((uint64_t(1) << l1->type) & CD_MASK_PROP_ALL) {
return MESHCMP_CDLAYERS_MISMATCH;
}
}
More information about the Bf-blender-cvs
mailing list