Commit 685dda8b authored by Bob Ippolito's avatar Bob Ippolito

Fix _struct typo that broke some 64-bit platforms

parent ad647859
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment