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/editors/space_file/filelist.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/editors/space_file/filelist.c')
-rw-r--r-- | source/blender/editors/space_file/filelist.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index 43d5d54805d..41ad7ad3503 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -887,7 +887,7 @@ static int groupname_to_code(char *group) char buf[32]; char *lslash; - BLI_strncpy(buf, group, 31); + BLI_strncpy(buf, group, sizeof(buf)); lslash= BLI_last_slash(buf); if (lslash) lslash[0]= '\0'; |