diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-12-02 13:33:45 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-12-02 14:10:07 +0400 |
commit | 1815225faa75eb64e83fdc9f066fcd6339502d52 (patch) | |
tree | 6558780d85792c9c41fcf280069870fae70eed7a /source/blender/editors/space_clip/clip_dopesheet_draw.c | |
parent | f64ae4cbe5a724496624de9e479c04f325613be5 (diff) |
Blender Font (BLF): add length argument to string width/height functions
This also fixes a crash editing buttons longer then UI_MAX_DRAW_STR
Diffstat (limited to 'source/blender/editors/space_clip/clip_dopesheet_draw.c')
-rw-r--r-- | source/blender/editors/space_clip/clip_dopesheet_draw.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/space_clip/clip_dopesheet_draw.c b/source/blender/editors/space_clip/clip_dopesheet_draw.c index 059b8ace7b9..e85b055bc59 100644 --- a/source/blender/editors/space_clip/clip_dopesheet_draw.c +++ b/source/blender/editors/space_clip/clip_dopesheet_draw.c @@ -341,7 +341,7 @@ void clip_draw_dopesheet_channels(const bContext *C, ARegion *ar) else UI_ThemeColor(TH_TEXT); - font_height = BLF_height(fontid, channel->name); + font_height = BLF_height(fontid, channel->name, sizeof(channel->name)); BLF_position(fontid, v2d->cur.xmin + CHANNEL_PAD, y - font_height / 2.0f, 0.0f); BLF_draw(fontid, channel->name, strlen(channel->name)); |