[Bf-blender-cvs] [ebe4bf6286b] master: Fix another id-property name length check

Campbell Barton noreply at git.blender.org
Wed Dec 9 07:34:48 CET 2020


Commit: ebe4bf6286b165cc5f7e6f237a9c2683e109e4de
Author: Campbell Barton
Date:   Wed Dec 9 17:33:11 2020 +1100
Branches: master
https://developer.blender.org/rBebe4bf6286b165cc5f7e6f237a9c2683e109e4de

Fix another id-property name length check

Missed this in 6c9263d817b7b4dcd4d6e1f365d1db0a83de6e51

===================================================================

M	source/blender/python/generic/idprop_py_api.c

===================================================================

diff --git a/source/blender/python/generic/idprop_py_api.c b/source/blender/python/generic/idprop_py_api.c
index c125edea19f..63fb685e66d 100644
--- a/source/blender/python/generic/idprop_py_api.c
+++ b/source/blender/python/generic/idprop_py_api.c
@@ -253,7 +253,7 @@ static int BPy_IDGroup_SetName(BPy_IDProperty *self, PyObject *value, void *UNUS
 
   name = _PyUnicode_AsStringAndSize(value, &name_size);
 
-  if (name_size > MAX_IDPROP_NAME) {
+  if (name_size >= MAX_IDPROP_NAME) {
     PyErr_SetString(PyExc_TypeError, "string length cannot exceed 63 characters!");
     return -1;
   }



More information about the Bf-blender-cvs mailing list