mirror of
https://github.com/python/cpython.git
synced 2025-07-29 06:05:00 +00:00
struct_pack(): Repair new assert-fail crash in
debug-build test_struct on a box where plain "char" is signed.
This commit is contained in:
parent
02cbdd3461
commit
2ad8c56e6c
1 changed files with 1 additions and 1 deletions
|
@ -1134,7 +1134,7 @@ struct_pack(PyObject *self, PyObject *args)
|
||||||
if (n > 255)
|
if (n > 255)
|
||||||
n = 255;
|
n = 255;
|
||||||
/* store the length byte */
|
/* 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;
|
res += num;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue