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>2012-01-11 16:33:51 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-01-11 16:33:51 +0400
commite10fd04db0bdcdbc326fce6cddc8af1179a5de5c (patch)
treea8f3a08b35101e30a0e5d4d1a94e0b2ef50c7122 /source/blender/editors/interface/view2d.c
parentdcef7346eb3f16c27b3f952b6452396e66f5e996 (diff)
use BLI_strncpy and BLI_snprintf when the size of the string is known.
fix for sequencer unique naming which was missed with string length update.
Diffstat (limited to 'source/blender/editors/interface/view2d.c')
-rw-r--r--source/blender/editors/interface/view2d.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c
index 81ea3370331..b8201d762df 100644
--- a/source/blender/editors/interface/view2d.c
+++ b/source/blender/editors/interface/view2d.c
@@ -1541,7 +1541,7 @@ static void scroll_printstr(Scene *scene, float x, float y, float val, int power
}
/* draw it */
- BLF_draw_default_ascii(x, y, 0.0f, timecode_str, sizeof(timecode_str)-1);
+ BLF_draw_default_ascii(x, y, 0.0f, timecode_str, sizeof(timecode_str));
}
/* Draw scrollbars in the given 2d-region */
@@ -2093,11 +2093,11 @@ void UI_view2d_text_cache_draw(ARegion *ar)
}
if(v2s->rect.xmin >= v2s->rect.xmax)
- BLF_draw_default((float)v2s->mval[0]+xofs, (float)v2s->mval[1]+yofs, 0.0, str, 65535);
+ BLF_draw_default((float)v2s->mval[0]+xofs, (float)v2s->mval[1]+yofs, 0.0, str, BLF_DRAW_STR_DUMMY_MAX);
else {
BLF_clipping_default(v2s->rect.xmin-4, v2s->rect.ymin-4, v2s->rect.xmax+4, v2s->rect.ymax+4);
BLF_enable_default(BLF_CLIPPING);
- BLF_draw_default(v2s->rect.xmin+xofs, v2s->rect.ymin+yofs, 0.0f, str, 65535);
+ BLF_draw_default(v2s->rect.xmin+xofs, v2s->rect.ymin+yofs, 0.0f, str, BLF_DRAW_STR_DUMMY_MAX);
BLF_disable_default(BLF_CLIPPING);
}
}