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/python/generic/IDProp.c')
-rw-r--r--source/blender/python/generic/IDProp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/python/generic/IDProp.c b/source/blender/python/generic/IDProp.c
index 1524812086b..541008ebaa5 100644
--- a/source/blender/python/generic/IDProp.c
+++ b/source/blender/python/generic/IDProp.c
@@ -67,9 +67,9 @@ PyObject *BPy_IDGroup_WrapData( ID *id, IDProperty *prop )
switch ( prop->type ) {
case IDP_STRING:
#ifdef USE_STRING_COERCE
- return PyC_UnicodeFromByte(IDP_Array(prop));
+ return PyC_UnicodeFromByteAndSize(IDP_Array(prop), prop->len);
#else
- return PyUnicode_FromString(IDP_Array(prop));
+ return PyUnicode_FromStringAndSize(IDP_Array(prop), prop->len);
#endif
case IDP_INT:
return PyLong_FromLong( (long)prop->data.val );
@@ -485,9 +485,9 @@ static PyObject *BPy_IDGroup_MapDataToPy(IDProperty *prop)
switch (prop->type) {
case IDP_STRING:
#ifdef USE_STRING_COERCE
- return PyC_UnicodeFromByte(IDP_Array(prop));
+ return PyC_UnicodeFromByteAndSize(IDP_Array(prop), prop->len);
#else
- return PyUnicode_FromString(IDP_Array(prop));
+ return PyUnicode_FromStringAndSize(IDP_Array(prop), prop->len);
#endif
break;
case IDP_FLOAT: