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>2008-06-11 13:04:41 +0400
committerCampbell Barton <ideasman42@gmail.com>2008-06-11 13:04:41 +0400
commitef0ea178b13b6642517f820a2baf3c316110d7ae (patch)
treeddcd78d44cda0a9d0a48053af4578d3f682ab8a3 /source/blender/blenkernel/intern/library.c
parentbdb3ef08cf694b167689a54e25ab026118b43e6d (diff)
bugfix, off by 1 error when filling in uninitialized values for new ID values when the requested name length was greater to or equal to 21.
Also replaced incorrect use of strcpy with memmove since the strings overlap
Diffstat (limited to 'source/blender/blenkernel/intern/library.c')
-rw-r--r--source/blender/blenkernel/intern/library.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c
index cc3f3f211a4..7c50b409693 100644
--- a/source/blender/blenkernel/intern/library.c
+++ b/source/blender/blenkernel/intern/library.c
@@ -934,7 +934,7 @@ int new_id(ListBase *lb, ID *id, const char *tname)
}
/* if result > 21, strncpy don't put the final '\0' to name. */
- if( result > 21 ) name[21]= 0;
+ if( result >= 21 ) name[21]= 0;
result = check_for_dupid( lb, id, name );
strcpy( id->name+2, name );