summaryrefslogtreecommitdiffstatshomepage
path: root/py/objlist.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/objlist.c')
-rw-r--r--py/objlist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/objlist.c b/py/objlist.c
index 911ddb98ab..de3be4c864 100644
--- a/py/objlist.c
+++ b/py/objlist.c
@@ -364,7 +364,7 @@ STATIC mp_obj_t list_insert(mp_obj_t self_in, mp_obj_t idx, mp_obj_t obj) {
if (index < 0) {
index = 0;
}
- if (index > self->len) {
+ if ((mp_uint_t)index > self->len) {
index = self->len;
}