summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBob Ippolito <bob@redivi.com>2006-05-26 14:23:21 (GMT)
committerBob Ippolito <bob@redivi.com>2006-05-26 14:23:21 (GMT)
commit685dda8b954eadf8fd70131b4381b3cb4ee52c7a (patch)
tree88f64ab02464ada6def4fa6ad65cba3291c78561 /Modules
parentad647859f4e45af749ca2f5a5bc45aaad3b1ca20 (diff)
downloadcpython-685dda8b954eadf8fd70131b4381b3cb4ee52c7a.zip
cpython-685dda8b954eadf8fd70131b4381b3cb4ee52c7a.tar.gz
cpython-685dda8b954eadf8fd70131b4381b3cb4ee52c7a.tar.bz2
Fix _struct typo that broke some 64-bit platforms
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_struct.c2
1 files changed, 1 insertions, 1 deletions
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);