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
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-08-28 13:28:41 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-08-28 13:28:41 +0400
commit852a03a6af6d67da58154b848b45a118eb38cdc0 (patch)
tree135a7420487c987fe7195de4599a340d56b8bc34 /source/blender/blenlib
parentfa2ba5fbf5848e4d61b697c624af9b9e9456eb20 (diff)
RNA_property_as_string now escapes the string (so operator redo can include strings with ", \n etc), also fixed a bug in string escape length limit.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r--source/blender/blenlib/intern/string.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenlib/intern/string.c b/source/blender/blenlib/intern/string.c
index 2f1ddf294ce..c4ed44f0cdb 100644
--- a/source/blender/blenlib/intern/string.c
+++ b/source/blender/blenlib/intern/string.c
@@ -129,7 +129,6 @@ size_t BLI_strescape(char *dst, const char *src, const size_t maxlen)
while(len < maxlen) {
switch(*src) {
case '\0':
- *dst= '\0';
break;
case '\\':
case '"':
@@ -144,7 +143,6 @@ size_t BLI_strescape(char *dst, const char *src, const size_t maxlen)
}
else {
/* not enough space to escape */
- *dst= '\0';
break;
}
/* intentionally pass through */
@@ -156,6 +154,8 @@ size_t BLI_strescape(char *dst, const char *src, const size_t maxlen)
len++;
}
+ *dst= '\0';
+
return len;
}