summaryrefslogtreecommitdiffstats
path: root/Modules/_struct.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_struct.c')
-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);