mirror of
https://github.com/python/cpython.git
synced 2025-08-01 07:33:08 +00:00
Fix _struct typo that broke some 64-bit platforms
This commit is contained in:
parent
ad647859f4
commit
685dda8b95
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue