[Bf-blender-cvs] [16652185ce6] master: Fix (unreported) wrong size of UserPreferences' `dupflag` parameter.

Bastien Montagne noreply at git.blender.org
Tue Jun 16 17:40:37 CEST 2020


Commit: 16652185ce697f41bb3b67be520ccc35719309f1
Author: Bastien Montagne
Date:   Tue Jun 16 17:37:58 2020 +0200
Branches: master
https://developer.blender.org/rB16652185ce697f41bb3b67be520ccc35719309f1

Fix (unreported) wrong size of UserPreferences' `dupflag` parameter.

Adding volume obdata option to `eDupli_ID_Flags` enum made it go beyond
the 16 bits of a short... Also, enums should typically be stored in
unsigned integers.

===================================================================

M	source/blender/makesdna/DNA_userdef_types.h

===================================================================

diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index 63e7a90547e..4b6d78a1d14 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -633,12 +633,12 @@ typedef struct UserDef {
   /** #eUserPref_Flag. */
   int flag;
   /** #eDupli_ID_Flags. */
-  short dupflag;
+  unsigned int dupflag;
   /** #eUserPref_PrefFlag preferences for the preferences. */
   char pref_flag;
   char savetime;
   char mouse_emulate_3_button_modifier;
-  char _pad4[3];
+  char _pad4[1];
   /** FILE_MAXDIR length. */
   char tempdir[768];
   char fontdir[768];



More information about the Bf-blender-cvs mailing list