patch [#23280] Generated suffixes of strip names contain random character (revision 31262)

from Torsten Rupp (rupp)
This commit is contained in:
Campbell Barton
2010-08-12 09:35:39 +00:00
parent 6be46efe6c
commit cf84992cb4

View File

@@ -1265,13 +1265,13 @@ void BKE_nlastrip_validate_name (AnimData *adt, NlaStrip *strip)
char *dot;
/* Strip off the suffix */
dot = strchr(strip->name, '.');
dot = strrchr(strip->name, '.');
if (dot) *dot=0;
/* Try different possibilities */
for (number = 1; number <= 999; number++) {
/* assemble alternative name */
BLI_snprintf(tempname, 128, "%s%c%03d", strip->name, ".", number);
BLI_snprintf(tempname, 128, "%s.%03d", strip->name, number);
/* if hash doesn't have this, set it */
if (BLI_ghash_haskey(gh, tempname) == 0) {