Merging r40572 through r40597 from trunk into soc-2011-tomato
[blender-staging.git] / source / blender / editors / interface / interface_draw.c
index b1201129f9bf0aca9ee9ca0e7e34a2fde229f940..789d9bf0179b3a5c63c01f6101e0c619b57c4359 100644 (file)
@@ -40,6 +40,7 @@
 
 #include "BLI_math.h"
 #include "BLI_rect.h"
+#include "BLI_string.h"
 #include "BLI_utildefines.h"
 
 #include "BKE_colortools.h"
@@ -836,7 +837,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);