From 69d081a7cf7e0ae1e815365af8b3c19be293da84 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sun, 25 May 2014 02:29:40 +0300 Subject: py: Handle case of slice start > stop in common sequence function. --- py/objstr.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'py/objstr.c') diff --git a/py/objstr.c b/py/objstr.c index 67de2ce80..4ec1034e1 100644 --- a/py/objstr.c +++ b/py/objstr.c @@ -355,9 +355,6 @@ STATIC mp_obj_t str_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value) { if (!mp_seq_get_fast_slice_indexes(self_len, index, &start, &stop)) { assert(0); } - if (start >= stop) { - return MP_OBJ_NEW_QSTR(MP_QSTR_); - } return str_new(type, self_data + start, stop - start); } #endif -- cgit v1.2.3