Skip to content

Commit c1a3184

Browse files
committed
review comment
1 parent 0aa56f0 commit c1a3184

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Objects/longobject.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3679,12 +3679,13 @@ long_hash(PyObject *obj)
36793679

36803680
// unroll first digit
36813681
Py_BUILD_ASSERT(PyHASH_BITS > PyLong_SHIFT);
3682-
assert(i>=2);
3682+
assert(i>=1);
36833683
--i;
36843684
x = v->long_value.ob_digit[i];
36853685
assert(x < PyHASH_MODULUS);
36863686
// unroll second digit
36873687
#if ( PyHASH_BITS > (2 * PyLong_SHIFT) )
3688+
assert(i>=2);
36883689
--i;
36893690
x <<= PyLong_SHIFT;
36903691
x += v->long_value.ob_digit[i];

0 commit comments

Comments
 (0)