Kaydet (Commit) 2ad8c56e authored tarafından Tim Peters's avatar Tim Peters

struct_pack(): Repair new assert-fail crash in

debug-build test_struct on a box where plain "char"
is signed.
üst 02cbdd34
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment