[Bf-blender-cvs] [6ee8670] master: Fix T39818: Strips from file with long filename broke auto-naming - animation can't be apply on it.

Bastien Montagne noreply at git.blender.org
Mon Apr 21 08:31:55 CEST 2014


Commit: 6ee8670fca946d146332e80ceff29e459cd91ed5
Author: Bastien Montagne
Date:   Mon Apr 21 08:30:20 2014 +0200
https://developer.blender.org/rB6ee8670fca946d146332e80ceff29e459cd91ed5

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

===================================================================

M	source/blender/blenkernel/intern/sequencer.c

===================================================================

diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c
index 040c46a..3e5b277 100644
--- a/source/blender/blenkernel/intern/sequencer.c
+++ b/source/blender/blenkernel/intern/sequencer.c
@@ -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 */
 		}
 	}




More information about the Bf-blender-cvs mailing list