diff Modules/structmodule.c @ 36534:862493ceae4b legacy-trunk

struct_pack(): Repair new assert-fail crash in debug-build test_struct on a box where plain "char" is signed.
author Tim Peters <tim.peters@gmail.com>
date Thu, 16 Feb 2006 20:19:46 +0000
parents 9f3f87e920a6
children
line wrap: on
line diff
--- a/Modules/structmodule.c	Thu Feb 16 19:44:46 2006 +0000
+++ b/Modules/structmodule.c	Thu Feb 16 20:19:46 2006 +0000
@@ -1134,7 +1134,7 @@
 				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;
 			}