diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-06-04 03:51:34 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-06-04 03:55:14 +0300 |
commit | 17fbce9549b6c031ae8745354e65c5e5acd308e2 (patch) | |
tree | 1bc072d372aa54d67f3d294ee87e6f85474fcc6c /source | |
parent | 38410e6e2527574176338fe7ba8711cbfdd2cc91 (diff) |
Cleanup: avoid temp string edit
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/anim_sys.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c index c85a2887a09..99aae6239e8 100644 --- a/source/blender/blenkernel/intern/anim_sys.c +++ b/source/blender/blenkernel/intern/anim_sys.c @@ -730,14 +730,10 @@ static char *rna_path_rename_fix(ID *owner_id, const char *prefix, const char *o DynStr *ds = BLI_dynstr_new(); const char *postfixPtr = oldNamePtr + oldNameLen; char *newPath = NULL; - char oldChar; - + /* add the part of the string that goes up to the start of the prefix */ if (prefixPtr > oldpath) { - oldChar = prefixPtr[0]; - prefixPtr[0] = 0; - BLI_dynstr_append(ds, oldpath); - prefixPtr[0] = oldChar; + BLI_dynstr_nappend(ds, oldpath, prefixPtr - oldpath); } /* add the prefix */ |