diff options
Diffstat (limited to 'source/blender/blenlib/intern/path_util.c')
-rw-r--r-- | source/blender/blenlib/intern/path_util.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c index 7237f7d4ecf..c3bc35a906b 100644 --- a/source/blender/blenlib/intern/path_util.c +++ b/source/blender/blenlib/intern/path_util.c @@ -147,10 +147,7 @@ int BLI_stringdec(const char *string, char *head, char *tail, unsigned short *nu */ void BLI_stringenc(char *string, const char *head, const char *tail, unsigned short numlen, int pic) { - char fmtstr[16] = ""; - if (pic < 0) pic = 0; - sprintf(fmtstr, "%%s%%.%dd%%s", numlen); - sprintf(string, fmtstr, head, pic, tail); + sprintf(string, "%s%.*d%s", head, numlen, MAX2(0, pic), tail); } /** |