diff options
author | Ken Hughes <khughes@pacific.edu> | 2007-05-07 01:42:43 +0400 |
---|---|---|
committer | Ken Hughes <khughes@pacific.edu> | 2007-05-07 01:42:43 +0400 |
commit | 170a0cbeb4d83fe1ce45e883264e9db4f5283203 (patch) | |
tree | f6587e9cd3d26512b766078755b182ccd868edaf /source/blender/blenkernel | |
parent | 22da7d68297db1a06d2a50c2a8a8a9bba240bb1e (diff) |
check_for_dupid() was checking wrong variables for on name changes; could
allow IDs will null names ("") to be entered into listbases multiple times.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/library.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c index 08e2fda533b..23cf864e181 100644 --- a/source/blender/blenkernel/intern/library.c +++ b/source/blender/blenkernel/intern/library.c @@ -863,8 +863,7 @@ int check_for_dupid(ListBase *lb, ID *id, char *name) splitIDname(idtest->name+2, leftest, &nrtest); /* if base names match... */ /* optimized */ - if( idtest->name[2] == name[0] && - strcmp(left, leftest)==0 ) { + if( *left == *leftest && strcmp(left, leftest)==0 ) { if(nrtest < maxtest) in_use[nrtest]= 1; /* mark as used */ if(nr <= nrtest) |