use BLI_strncpy and BLI_snprintf when the size of the string is known.
[blender-staging.git] / source / blender / editors / screen / area.c
index 08833b335eb531a3f4da8c28290fab23c2bc7551..e4088fe10c4f1f0a1b0e8f2731249f645e1d98d5 100644 (file)
@@ -478,7 +478,7 @@ void ED_region_do_draw(bContext *C, ARegion *ar)
                glClear(GL_COLOR_BUFFER_BIT);
                
                UI_ThemeColor(TH_TEXT);
-               BLF_draw_default(20, 8, 0.0f, ar->headerstr, 65535); /* XXX, use real length */
+               BLF_draw_default(20, 8, 0.0f, ar->headerstr, BLF_DRAW_STR_DUMMY_MAX);
        }
        else if(at->draw) {
                at->draw(C, ar);
@@ -1809,5 +1809,5 @@ void ED_region_info_draw(ARegion *ar, const char *text, int block, float alpha)
        /* text */
        UI_ThemeColor(TH_TEXT_HI);
        BLF_position(fontid, 12, rect.ymin + 5, 0.0f);
-       BLF_draw(fontid, text, 256);
+       BLF_draw(fontid, text, BLF_DRAW_STR_DUMMY_MAX);
 }