From: Bob Ippolito Date: Fri, 26 May 2006 14:23:21 +0000 (+0000) Subject: Fix _struct typo that broke some 64-bit platforms X-Git-Tag: v2.5b1~466 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=685dda8b954eadf8fd70131b4381b3cb4ee52c7a;p=python Fix _struct typo that broke some 64-bit platforms --- diff --git a/Modules/_struct.c b/Modules/_struct.c index 6d7a58ed46..8c98db85e5 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);