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:
Tim Peters 2006-02-16 20:19:46 +00:00
parent 02cbdd3461
commit 2ad8c56e6c
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}