]> granicus.if.org Git - python/commitdiff
Fix _struct typo that broke some 64-bit platforms
authorBob Ippolito <bob@redivi.com>
Fri, 26 May 2006 14:23:21 +0000 (14:23 +0000)
committerBob Ippolito <bob@redivi.com>
Fri, 26 May 2006 14:23:21 +0000 (14:23 +0000)
Modules/_struct.c

index 6d7a58ed4638646808a35c9a5c6bc3f606267a1f..8c98db85e513224219c851123a04691d045ecdae 100644 (file)
@@ -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);