py/objarray: Fix sign mismatch in comparison.

Found when compiling with clang and -Wsign-compare.
pull/5944/head
stijn 2020-03-31 14:19:52 +02:00 zatwierdzone przez Damien George
rodzic 7fb9edf436
commit dc4d119d3d
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -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;