summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Objects/unicodeobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index c6dcb58..bff74d9 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -12254,7 +12254,7 @@ PyUnicode_Format(PyObject *format, PyObject *args)
case 'c':
pbuf = formatbuf;
kind = PyUnicode_4BYTE_KIND;
- len = formatchar(pbuf, sizeof(formatbuf)/sizeof(Py_UNICODE), v);
+ len = formatchar(pbuf, Py_ARRAY_LENGTH(formatbuf), v);
if (len < 0)
goto onError;
break;