Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-09-26 20:53:04 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-09-26 20:53:04 +0400
commitfbdfdfefd814128520198c033866cc50298f1758 (patch)
treedb1905986bf496190a77a6710da49fa36214d665 /source/blender/editors/interface/interface_utils.c
parent8a423f59ea123948383f024695bf058213169d82 (diff)
use BLI_snprintf rather than sprintf for interface functions
Diffstat (limited to 'source/blender/editors/interface/interface_utils.c')
-rw-r--r--source/blender/editors/interface/interface_utils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_utils.c b/source/blender/editors/interface/interface_utils.c
index a49060eaca2..206ecbad1d0 100644
--- a/source/blender/editors/interface/interface_utils.c
+++ b/source/blender/editors/interface/interface_utils.c
@@ -36,6 +36,7 @@
#include "DNA_object_types.h"
#include "BLI_utildefines.h"
+#include "BLI_string.h"
#include "BLF_translation.h"
@@ -116,7 +117,7 @@ uiBut *uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int ind
}
case PROP_COLLECTION: {
char text[256];
- sprintf(text, UI_translate_do_iface(N_("%d items")), RNA_property_collection_length(ptr, prop));
+ BLI_snprintf(text, sizeof(text), UI_translate_do_iface(N_("%d items")), RNA_property_collection_length(ptr, prop));
but= uiDefBut(block, LABEL, 0, text, x1, y1, x2, y2, NULL, 0, 0, 0, 0, NULL);
uiButSetFlag(but, UI_BUT_DISABLED);
break;