Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-02-11 04:35:10 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-02-11 05:20:49 +0300
commitad2a8400e9a263acf924311ce1fb050b0e1eb415 (patch)
treeee692cb7d489915c5b1242f2652a807e048e4f0a /source/blender/makesdna/DNA_meshdata_types.h
parent56a4ee3fdbc647d037a89128725e5988715c59ad (diff)
Fix T56108: Crash editing corrupted vertex groups
While the file in this report had corrupted values, this is avoidable without adding any extra overhead. Use unsigned vertex group indices since we don't need negative values, this is an alternative to checking they aren't negative in many places. Vertex group values over INT_MAX is still considered invalid, so any accidental unsigned wrapping won't be silently ignored.
Diffstat (limited to 'source/blender/makesdna/DNA_meshdata_types.h')
-rw-r--r--source/blender/makesdna/DNA_meshdata_types.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h
index 648389d610f..be904c5bf94 100644
--- a/source/blender/makesdna/DNA_meshdata_types.h
+++ b/source/blender/makesdna/DNA_meshdata_types.h
@@ -280,7 +280,7 @@ typedef struct MStringProperty {
*/
typedef struct MDeformWeight {
/** The index for the vertex group, must *always* be unique when in an array. */
- int def_nr;
+ unsigned int def_nr;
/** Weight between 0.0 and 1.0. */
float weight;
} MDeformWeight;