Skip to content

Commit

Permalink
pythongh-115391: Fix compiler warning in Objects/longobject.c (pyth…
Browse files Browse the repository at this point in the history
  • Loading branch information
Eclips4 authored Feb 13, 2024
1 parent 4deb705 commit 206f73d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Objects/longobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -1135,7 +1135,7 @@ PyLong_AsNativeBytes(PyObject* vv, void* buffer, Py_ssize_t n, int endianness)
if (n <= 0) {
// nothing to do!
}
else if (n <= sizeof(cv.b)) {
else if (n <= (Py_ssize_t)sizeof(cv.b)) {
#if PY_LITTLE_ENDIAN
if (little_endian) {
memcpy(buffer, cv.b, n);
Expand Down

0 comments on commit 206f73d

Please sign in to comment.