check_for_dupid() was checking wrong variables for on name changes; could

allow IDs will null names ("") to be entered into listbases multiple times.
This commit is contained in:
Ken Hughes 2007-05-06 21:42:43 +00:00
parent 22da7d6829
commit 170a0cbeb4

@ -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)