diff options
author | Tim Peters <tim.peters@gmail.com> | 2006-02-16 20:19:46 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2006-02-16 20:19:46 (GMT) |
commit | 2ad8c56e6c77f5eb04a9004f525b59ee717a8f3d (patch) | |
tree | 1c1b387c687d444bfd0e5da3102fa8eb90b125d6 /Modules/structmodule.c | |
parent | 02cbdd3461b07bde5f3c304c1c316191c0a73c52 (diff) | |
download | cpython-2ad8c56e6c77f5eb04a9004f525b59ee717a8f3d.zip cpython-2ad8c56e6c77f5eb04a9004f525b59ee717a8f3d.tar.gz cpython-2ad8c56e6c77f5eb04a9004f525b59ee717a8f3d.tar.bz2 |
struct_pack(): Repair new assert-fail crash in
debug-build test_struct on a box where plain "char"
is signed.
Diffstat (limited to 'Modules/structmodule.c')
-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 2fa6e90..4713c0c 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; } |