diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-09-26 22:51:10 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-09-26 22:51:10 +0400 |
commit | 58587a38818b0dba25886c97d584285fef4e9249 (patch) | |
tree | 38e00681d39ee6a0f588232c9ef70ec5f80e22df /source/blender/nodes/intern | |
parent | e897c8e83e1277767d9a44cb0ecb6f8a279dddc3 (diff) |
replace strncpy with BLI_strncpy, in some cases strncpy was being misused since it doesnt ensure \0 termination.
also dont call CTX_data_scene() twice when checking for function arguments.
Diffstat (limited to 'source/blender/nodes/intern')
-rw-r--r-- | source/blender/nodes/intern/node_common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/nodes/intern/node_common.c b/source/blender/nodes/intern/node_common.c index 8225c986409..fa5a3c727c2 100644 --- a/source/blender/nodes/intern/node_common.c +++ b/source/blender/nodes/intern/node_common.c @@ -567,7 +567,7 @@ bNodeSocket *node_group_add_socket(bNodeTree *ngroup, const char *name, int type bNodeSocketType *stype = ntreeGetSocketType(type); bNodeSocket *gsock = MEM_callocN(sizeof(bNodeSocket), "bNodeSocket"); - strncpy(gsock->name, name, sizeof(gsock->name)); + BLI_strncpy(gsock->name, name, sizeof(gsock->name)); gsock->type = type; /* group sockets are dynamically added */ gsock->flag |= SOCK_DYNAMIC; |