Fix T39818: Strips from file with long filename broke auto-naming - animation can't be apply on it.

This commit is contained in:
Bastien Montagne 2014-04-21 08:30:20 +02:00
parent b1e1f86eb7
commit 6ee8670fca
Notes: blender-bot 2023-02-14 10:46:10 +01:00
Referenced by issue #39818, Strips from file with long filename broke auto-naming - animation can't be apply on it
1 changed files with 3 additions and 2 deletions

View File

@ -948,8 +948,9 @@ static void seqbase_unique_name(ListBase *seqbasep, SeqUniqueInfo *sui)
Sequence *seq;
for (seq = seqbasep->first; seq; seq = seq->next) {
if ((sui->seq != seq) && STREQ(sui->name_dest, seq->name + 2)) {
/* SEQ_NAME_MAXSTR - 2 for prefix, -1 for \0, -4 for the number */
BLI_snprintf(sui->name_dest, sizeof(sui->name_dest), "%.59s.%03d", sui->name_src, sui->count++);
/* SEQ_NAME_MAXSTR -4 for the number, -1 for \0, - 2 for prefix */
BLI_snprintf(sui->name_dest, sizeof(sui->name_dest), "%.*s.%03d", SEQ_NAME_MAXSTR - 4 - 1 - 2,
sui->name_src, sui->count++);
sui->match = 1; /* be sure to re-scan */
}
}