diff options
-rw-r--r-- | Modules/structmodule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/structmodule.c b/Modules/structmodule.c index 2fa6e909c5..4713c0cf76 100644 --- a/Modules/structmodule.c +++ b/Modules/structmodule.c @@ -1134,7 +1134,7 @@ struct_pack(PyObject *self, PyObject *args) if (n > 255) n = 255; /* store the length byte */ - *res++ = Py_SAFE_DOWNCAST(n, Py_ssize_t, char); + *res++ = Py_SAFE_DOWNCAST(n, Py_ssize_t, unsigned char); res += num; break; } |