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>2013-04-09 04:42:01 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-04-09 04:42:01 +0400
commite6bd510dde6289efcead80e3d21cb21876282a56 (patch)
tree4c32aceca2e4fd8e1a86a4cfe612bcf25d5f9f1e
parent79d353eebde28c14c432f0831db0c564c867f471 (diff)
fix [#34902] Unicode decode error in Python console when completing a method name of text object in edit mode
-rw-r--r--source/blender/makesrna/intern/rna_curve.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c
index 33bb20046e7..f6dc5bd5ba6 100644
--- a/source/blender/makesrna/intern/rna_curve.c
+++ b/source/blender/makesrna/intern/rna_curve.c
@@ -430,17 +430,17 @@ static void rna_Curve_offset_set(PointerRNA *ptr, float value)
cu->width = 1.0f + value;
}
-/* name functions that ignore the first two ID characters */
+static int rna_Curve_body_length(PointerRNA *ptr);
static void rna_Curve_body_get(PointerRNA *ptr, char *value)
{
Curve *cu = (Curve *)ptr->id.data;
- BLI_strncpy(value, cu->str, cu->len + 1);
+ BLI_strncpy(value, cu->str, rna_Curve_body_length(ptr) + 1);
}
static int rna_Curve_body_length(PointerRNA *ptr)
{
Curve *cu = (Curve *)ptr->id.data;
- return cu->len;
+ return cu->editfont ? strlen(cu->str) : cu->len;
}
/* TODO - check UTF & python play nice */