summaryrefslogtreecommitdiff
path: root/extmod/modure.c
diff options
context:
space:
mode:
Diffstat (limited to 'extmod/modure.c')
-rw-r--r--extmod/modure.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/extmod/modure.c b/extmod/modure.c
index eb010faf9..910166249 100644
--- a/extmod/modure.c
+++ b/extmod/modure.c
@@ -62,7 +62,7 @@ STATIC void match_print(void (*print)(void *env, const char *fmt, ...), void *en
STATIC mp_obj_t match_group(mp_obj_t self_in, mp_obj_t no_in) {
mp_obj_match_t *self = self_in;
- mp_int_t no = mp_obj_int_get(no_in);
+ mp_int_t no = mp_obj_int_get_truncated(no_in);
if (no < 0 || no >= self->num_matches / 2) {
nlr_raise(mp_obj_new_exception_arg1(&mp_type_IndexError, no_in));
}
@@ -130,7 +130,7 @@ STATIC mp_obj_t re_split(uint n_args, const mp_obj_t *args) {
int maxsplit = 0;
if (n_args > 2) {
- maxsplit = mp_obj_int_get(args[2]);
+ maxsplit = mp_obj_int_get_truncated(args[2]);
}
mp_obj_t retval = mp_obj_new_list(0, NULL);