diff options
author | Bastien Montagne <bastien@blender.org> | 2020-09-20 19:41:50 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2020-09-20 19:41:50 +0300 |
commit | 5ea1049e7520c0f369d2a76811410b1274699e81 (patch) | |
tree | 5d7f5158b8c329b9a7e3b0fa5aa6ac2ce65701a1 /source/blender/modifiers | |
parent | 86c5d1f4aa07551b289619da501889a172a39e03 (diff) |
Sanitize type 'size' parameters in our read/write file code
This patch tries to sanitize the types of our size parameters across our read
and write code, which is currently fairly inconsistent (using `int`, `uint`,
`size_t`...), by using `size_t` everywhere. Since in Blender file themselves
we can only store chunk of size `MAX_INT`, added some asserts to ensure that
as well.
See {T79561} for details.
Differential Revision: https://developer.blender.org/D8672
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r-- | source/blender/modifiers/intern/MOD_correctivesmooth.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/modifiers/intern/MOD_correctivesmooth.c b/source/blender/modifiers/intern/MOD_correctivesmooth.c index 5eee196423e..9fb528da736 100644 --- a/source/blender/modifiers/intern/MOD_correctivesmooth.c +++ b/source/blender/modifiers/intern/MOD_correctivesmooth.c @@ -823,7 +823,7 @@ static void blendWrite(BlendWriter *writer, const ModifierData *md) const CorrectiveSmoothModifierData *csmd = (const CorrectiveSmoothModifierData *)md; if (csmd->bind_coords) { - BLO_write_float3_array(writer, (int)csmd->bind_coords_num, (float *)csmd->bind_coords); + BLO_write_float3_array(writer, csmd->bind_coords_num, (float *)csmd->bind_coords); } } |