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:
Diffstat (limited to 'source/blender/blenloader/intern/writefile.c')
-rw-r--r--source/blender/blenloader/intern/writefile.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 57c5c90555e..c54363e692a 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -848,6 +848,13 @@ static void write_mballs(WriteData *wd, ListBase *idbase)
}
}
+int amount_of_chars(char *str)
+{
+ // Since the data is saved as UTF-8 to the cu->str
+ // The cu->len is not same as the strlen(cu->str)
+ return strlen(str);
+}
+
static void write_curves(WriteData *wd, ListBase *idbase)
{
Curve *cu;
@@ -863,7 +870,7 @@ static void write_curves(WriteData *wd, ListBase *idbase)
writedata(wd, DATA, sizeof(void *)*cu->totcol, cu->mat);
if(cu->vfont) {
- writedata(wd, DATA, cu->len+1, cu->str);
+ writedata(wd, DATA, amount_of_chars(cu->str)+1, cu->str);
writestruct(wd, DATA, "CharInfo", cu->len, cu->strinfo);
writestruct(wd, DATA, "TextBox", cu->totbox, cu->tb);
}