merging trunk 17485:17520
[blender.git] / source / blender / src / buttons_editing.c
index 429c05feadc2b94eb4a09b54c0f3dc000282e3b4..50c644ade6f6ed1c8c4cb5689f88c0925aa2e7c6 100644 (file)
@@ -5369,7 +5369,7 @@ char *get_vertexgroup_menustr(Object *ob)
                qsort_ptr = MEM_callocN (defCount * sizeof (qsort_ptr[0]),
                                                                 "qsort_ptr");
                for (index = 1, dg = ob->defbase.first; dg; index++, dg=dg->next) {
-                       printed = snprintf (qsort_ptr[index - 1], sizeof (dg->name), dg->name);
+                       printed = snprintf (qsort_ptr[index - 1], sizeof (dg->name), "%s", dg->name);
                        snprintf (qsort_ptr[index - 1]+printed, 6+1, "%%x%d|", index); // +1 to move the \0   see above 999 max here too
                }