py/objarray: Fix sign mismatch in comparison.
Found when compiling with clang and -Wsign-compare.
This commit is contained in:
parent
7fb9edf436
commit
dc4d119d3d
|
@ -445,7 +445,7 @@ STATIC mp_obj_t array_subscr(mp_obj_t self_in, mp_obj_t index_in, mp_obj_t value
|
|||
}
|
||||
#endif
|
||||
if (len_adj > 0) {
|
||||
if (len_adj > o->free) {
|
||||
if ((size_t)len_adj > o->free) {
|
||||
// TODO: alloc policy; at the moment we go conservative
|
||||
o->items = m_renew(byte, o->items, (o->len + o->free) * item_sz, (o->len + len_adj) * item_sz);
|
||||
o->free = len_adj;
|
||||
|
|
Loading…
Reference in New Issue