Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Victor Stinner <vstinner@python.org>
  • Loading branch information
skirpichev and vstinner authored Dec 17, 2024
1 parent 83471fd commit cb169f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Modules/_decimal/_decimal.c
Original file line number Diff line number Diff line change
Expand Up @@ -2352,9 +2352,9 @@ dec_from_long(decimal_state *state, PyTypeObject *type, PyObject *v,
else {
const int64_t value = export_long.value;

if (INT32_MIN <= value && value <= INT32_MAX) {
if (-UINT32_MAX <= value && value <= UINT32_MAX) {
_dec_settriple(dec, value < 0 ? MPD_NEG : MPD_POS,
Py_ABS(value), 0);
(uint32_t)Py_ABS(value), 0);
mpd_qfinalize(MPD(dec), ctx, status);
}
else {
Expand Down

0 comments on commit cb169f7

Please sign in to comment.