[Bf-blender-cvs] [97765ff] soc-2013-paint: Fix for incorrect use of sizeof

Campbell Barton noreply at git.blender.org
Sat Jul 12 12:45:18 CEST 2014


Commit: 97765ff5496685c20a864f531c2a98adfecf26b8
Author: Campbell Barton
Date:   Sat Jul 12 20:42:43 2014 +1000
https://developer.blender.org/rB97765ff5496685c20a864f531c2a98adfecf26b8

Fix for incorrect use of sizeof

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

M	source/blender/editors/sculpt_paint/paint_image_proj.c

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

diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index eca1d92..5e68875 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -4859,7 +4859,7 @@ bool proj_paint_add_slot(bContext *C, int type, Material *ma)
 				Image *ima;
 
 				/* get the name of the texture layer type */
-				for (i = 0; i < sizeof(layer_type_items); i++) {
+				for (i = 0; i < ARRAY_SIZE(layer_type_items); i++) {
 					if (type == layer_type_items[i].value) {
 						BLI_strncpy(name, layer_type_items[i].name, TEXNAME_MAX);
 						break;




More information about the Bf-blender-cvs mailing list