fix [#27554] vertex group names

- duplicate vertex group names were not being checked for.
- also made the first duplicate end with .001 rather than .000
This commit is contained in:
2011-06-05 04:52:32 +00:00
parent a79072c80d
commit 3a6adc0ed3
2 changed files with 13 additions and 2 deletions

View File

@@ -153,8 +153,10 @@ void BLI_stringenc(char *string, const char *head, const char *tail, unsigned sh
int BLI_split_name_num(char *left, int *nr, const char *name, const char delim)
{
int a;
*nr= 0;
/* could use '0', but this would mean the first
* duplicate would become FooBar.000 */
*nr= 1;
a= strlen(name);
memcpy(left, name, (a + 1) * sizeof(char));