Fix passing the same argument twice to BLI_strncpy
authorCampbell Barton <ideasman42@gmail.com>
Wed, 4 Oct 2017 23:47:08 +0000 (10:47 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 4 Oct 2017 23:50:51 +0000 (10:50 +1100)
source/blender/editors/space_node/node_templates.c

index ec525e684b0c72def3048c3844dcebf885472671..5d0877a1eff1ed9d6d9845d477449798aca15ab0 100644 (file)
@@ -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);