summaryrefslogtreecommitdiff
path: root/py
diff options
context:
space:
mode:
authorScott Shawcroft <scott@tannewt.org>2019-02-04 16:11:16 -0800
committerScott Shawcroft <scott@tannewt.org>2019-02-04 16:11:16 -0800
commit0c50154c837df7900dbc55dbc3fb81c2d25a21c9 (patch)
tree6c1aaf634be629ec4b6c4315fa612e5db585deae /py
parentc60f77d5ab5c68f1fdaf0c734b77629418c7f903 (diff)
Use generic overflow so 64 bit is handled ok.
Diffstat (limited to 'py')
-rw-r--r--py/sequence.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/sequence.c b/py/sequence.c
index 26b432578..a750e5bac 100644
--- a/py/sequence.c
+++ b/py/sequence.c
@@ -37,7 +37,7 @@
// Detect when a multiply causes an overflow.
size_t mp_seq_multiply_len(size_t item_sz, size_t len) {
size_t new_len;
- if (__builtin_umul_overflow(item_sz, len, &new_len)) {
+ if (__builtin_mul_overflow(item_sz, len, &new_len)) {
mp_raise_msg(&mp_type_OverflowError, translate("small int overflow"));
}
return new_len;