[Bf-blender-cvs] [d27ca066e73] master: Fix passing the same argument twice to BLI_strncpy
Campbell Barton
noreply at git.blender.org
Thu Oct 5 01:38:53 CEST 2017
Commit: d27ca066e73bfc4168830292643dc1caee510ba4
Author: Campbell Barton
Date: Thu Oct 5 10:47:08 2017 +1100
Branches: master
https://developer.blender.org/rBd27ca066e73bfc4168830292643dc1caee510ba4
Fix passing the same argument twice to BLI_strncpy
===================================================================
M source/blender/editors/space_node/node_templates.c
===================================================================
diff --git a/source/blender/editors/space_node/node_templates.c b/source/blender/editors/space_node/node_templates.c
index ec525e684b0..5d0877a1eff 100644
--- a/source/blender/editors/space_node/node_templates.c
+++ b/source/blender/editors/space_node/node_templates.c
@@ -683,10 +683,11 @@ static void ui_node_draw_input(uiLayout *layout, bContext *C, bNodeTree *ntree,
RNA_pointer_create(&ntree->id, &RNA_Node, node, &nodeptr);
/* indented label */
- for (i = 0; i < indent; i++)
+ for (i = 0; i < indent; i++) {
label[i] = ' ';
+ }
label[indent] = '\0';
- BLI_snprintf(label, UI_MAX_NAME_STR, "%s%s:", label, IFACE_(input->name));
+ BLI_snprintf(label + indent, UI_MAX_NAME_STR - indent, "%s:", IFACE_(input->name));
/* split in label and value */
split = uiLayoutSplit(layout, 0.35f, false);
More information about the Bf-blender-cvs
mailing list