From 4405b01586728c017a538eb00843554a556d402a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 16 Feb 2010 18:03:10 +0000 Subject: minor adjustment to BLI_uniquename, the last extension is used so "A.B.001" --> "A.B.002" rather then "A.001" --- source/blender/blenlib/intern/path_util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/blenlib') diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c index 8d5df59c4bc..2703de13bd3 100644 --- a/source/blender/blenlib/intern/path_util.c +++ b/source/blender/blenlib/intern/path_util.c @@ -257,12 +257,12 @@ void BLI_uniquename(ListBase *list, void *vlink, const char defname[], char deli return; /* Strip off the suffix */ - dot = strchr(GIVE_STRADDR(vlink, name_offs), delim); + dot = strrchr(GIVE_STRADDR(vlink, name_offs), delim); if (dot) *dot=0; for (number = 1; number <= 999; number++) { - BLI_snprintf(tempname, 128, "%s%c%03d", GIVE_STRADDR(vlink, name_offs), delim, number); + BLI_snprintf(tempname, sizeof(tempname), "%s%c%03d", GIVE_STRADDR(vlink, name_offs), delim, number); exists = 0; for (link= list->first; link; link= link->next) { -- cgit v1.2.3