Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-03-31 14:31:14 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-03-31 14:31:14 +0400
commit75cd392a570ded2c8b1e2abf1d98383aaab706a5 (patch)
tree961685c9a0d2f98428dae9f98d7511d758c2d18a /source
parentd7dd2154a1e2359b9bf5cb66c5c97507f2d7a501 (diff)
fix for own error r35877, was ignoring #'s in file path by using the digits value passed rather then the number of digits in the string.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenlib/intern/path_util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c
index e9efc63bc55..689c6398705 100644
--- a/source/blender/blenlib/intern/path_util.c
+++ b/source/blender/blenlib/intern/path_util.c
@@ -587,7 +587,7 @@ int BLI_path_frame(char *path, int frame, int digits)
if (stringframe_chars(path, &ch_sta, &ch_end)) { /* warning, ch_end is the last # +1 */
char tmp[FILE_MAX];
- sprintf(tmp, "%.*s%.*d%s", ch_sta, path, digits, frame, path+ch_end);
+ sprintf(tmp, "%.*s%.*d%s", ch_sta, path, ch_end-ch_sta, frame, path+ch_end);
strcpy(path, tmp);
return 1;
}
@@ -603,7 +603,7 @@ int BLI_path_frame_range(char *path, int sta, int end, int digits)
if (stringframe_chars(path, &ch_sta, &ch_end)) { /* warning, ch_end is the last # +1 */
char tmp[FILE_MAX];
- sprintf(tmp, "%.*s%.*d-%.*d%s", ch_sta, path, digits, sta, digits, end, path+ch_end);
+ sprintf(tmp, "%.*s%.*d-%.*d%s", ch_sta, path, ch_end-ch_sta, sta, ch_end-ch_sta, end, path+ch_end);
strcpy(path, tmp);
return 1;
}