Skip to content

Commit

Permalink
+1
Browse files Browse the repository at this point in the history
  • Loading branch information
skirpichev committed Sep 18, 2024
1 parent 4e4f98b commit 2b455a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pythoncapi_compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -1268,7 +1268,7 @@ PyLong_Export(PyObject *obj, PyLongExport *export_long)
int overflow;
long value = PyLong_AsLongAndOverflow(obj, &overflow);

if ((size_t)bytes <= sizeof(value)) {
if (!overflow) {
export_long->value = value;
export_long->negative = 0;
export_long->ndigits = 0;
Expand Down

0 comments on commit 2b455a7

Please sign in to comment.