[Bf-committers] Patch #23280: Generated suffixes of strip names contain random character
Torsten Rupp
torsten.rupp at gmx.net
Thu Aug 12 08:05:39 CEST 2010
Dear developers,
I add patch #23280 in the patch tracker:
When a new strip is added in the NLA panel the created unique name
contain a random character instead of the expected "." before the
suffix (3 digit number). I traced back this bug to
source/blender/blenkernel/intern/nla.c:BKE_nlastrip_validate_name()
There sprintf() is used with a %c format specifier, but the argument
is a string. Please find attached a patch to fix this problem. The
patch do the following:
- use strrchr() instead of strchr() to cut off the suffix. strchr()
may cut off to early when the name itself contain a ".". With
strrchr() the last part after a "." (the suffix) is cut off
- directly use "." in sprintf() instead of %c and argument. The "." is
fixed anyway, thus put it into the format string.
Torsten
More information about the Bf-committers
mailing list