diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-11-05 10:35:21 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-11-05 10:35:21 +0300 |
commit | e179c92a278160ad3a1523a17ef272f6f3547f46 (patch) | |
tree | 743ba7ec0ac67b6afc202cdd7a5d063d6ee617ae /source/blender/blenkernel/intern/curve.c | |
parent | 0ebdbdac00fda4ceb7f8a53e3b944575a8d76133 (diff) |
tedious string copying changes
- use sizeof() in more places.
- fixed some off by 1 bugs copying strings. setting curve font family for instance was 1 char too short.
- replace strncpy and strcpy with BLI_strncpy
Diffstat (limited to 'source/blender/blenkernel/intern/curve.c')
-rw-r--r-- | source/blender/blenkernel/intern/curve.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c index a7dd80bff4d..b6b6dde3cdc 100644 --- a/source/blender/blenkernel/intern/curve.c +++ b/source/blender/blenkernel/intern/curve.c @@ -155,7 +155,7 @@ Curve *add_curve(char *name, int type) cu->vfont= cu->vfontb= cu->vfonti= cu->vfontbi= get_builtin_font(); cu->vfont->id.us+=4; cu->str= MEM_mallocN(12, "str"); - strcpy(cu->str, "Text"); + BLI_strncpy(cu->str, "Text", 12); cu->len= cu->pos= 4; cu->strinfo= MEM_callocN(12*sizeof(CharInfo), "strinfo new"); cu->totbox= cu->actbox= 1; |