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
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue