diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-08-04 04:01:41 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-08-04 04:01:41 +0400 |
commit | 5881fe5d679b38eb40b59c1af3bc3db88a53f35d (patch) | |
tree | 38e130faf7aee14f0017545af15c637a45a86778 /source/blender/editors/interface/interface_layout.c | |
parent | dd037a85a02b9344045c6f4cb8ff792827b69eff (diff) |
avoid runtime overflow (1 << 31), for RNA and armature layer UI.
Diffstat (limited to 'source/blender/editors/interface/interface_layout.c')
-rw-r--r-- | source/blender/editors/interface/interface_layout.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index 2e80af1b3ad..079ba97aa9d 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -355,7 +355,7 @@ static void ui_item_array(uiLayout *layout, uiBlock *block, const char *name, in PropertyType type; PropertySubType subtype; uiLayout *sub; - int a, b; + unsigned int a, b; /* retrieve type and subtype */ type = RNA_property_type(prop); @@ -373,8 +373,8 @@ static void ui_item_array(uiLayout *layout, uiBlock *block, const char *name, in /* special check for layer layout */ int butw, buth, unit; int cols = (len >= 20) ? 2 : 1; - int colbuts = len / (2 * cols); - int layer_used = 0; + const unsigned int colbuts = len / (2 * cols); + unsigned int layer_used = 0; uiBlockSetCurLayout(block, uiLayoutAbsolute(layout, FALSE)); |