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_draw.c
parent8a423f59ea123948383f024695bf058213169d82 (diff)
use BLI_snprintf rather than sprintf for interface functions
Diffstat (limited to 'source/blender/editors/interface/interface_draw.c')
-rw-r--r--source/blender/editors/interface/interface_draw.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c
index fd437d2b0e5..b65be48f7ee 100644
--- a/source/blender/editors/interface/interface_draw.c
+++ b/source/blender/editors/interface/interface_draw.c
@@ -39,6 +39,7 @@
#include "BLI_math.h"
#include "BLI_rect.h"
+#include "BLI_string.h"
#include "BLI_utildefines.h"
#include "BKE_colortools.h"
@@ -835,7 +836,7 @@ void ui_draw_but_WAVEFORM(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wcol),
/* draw grid lines here */
for (i=0; i<6; i++) {
char str[4];
- sprintf(str,"%-3d",i*20);
+ BLI_snprintf(str, sizeof(str), "%-3d",i*20);
str[3]='\0';
fdrawline(rect.xmin+22, yofs+(i/5.f)*h, rect.xmax+1, yofs+(i/5.f)*h);
BLF_draw_default(rect.xmin+1, yofs-5+(i/5.f)*h, 0, str, sizeof(str)-1);