From 685dda8b954eadf8fd70131b4381b3cb4ee52c7a Mon Sep 17 00:00:00 2001 From: Bob Ippolito Date: Fri, 26 May 2006 14:23:21 +0000 Subject: Fix _struct typo that broke some 64-bit platforms --- Modules/_struct.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/_struct.c b/Modules/_struct.c index 6d7a58e..8c98db8 100644 --- a/Modules/_struct.c +++ b/Modules/_struct.c @@ -519,7 +519,7 @@ np_uint(char *p, PyObject *v, const formatdef *f) #endif y = (unsigned int)x; #if defined(PY_STRUCT_RANGE_CHECKING) && (SIZEOF_LONG > SIZEOF_INT) - if (x < UINT_MIN || x > UINT_MAX) + if (x > UINT_MAX) return _range_error(f->format, sizeof(y), 1); #endif memcpy(p, (char *)&y, sizeof y); -- cgit v0.12