commit | ea2509d92cbb222854ceb0b323b616b807dd221b | [log] [tgz] |
---|---|---|
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | Sun Feb 02 08:57:05 2014 +0200 |
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | Sun Feb 02 08:58:16 2014 +0200 |
tree | 9cc30cf55b4c563be2fe139996f727815732eb0e | |
parent | 6964422cf426164b39abdc66f260be4f582309e0 [diff] [blame] |
Fix assert() usage.
diff --git a/py/objstr.c b/py/objstr.c index 50cd31d..03602b6 100644 --- a/py/objstr.c +++ b/py/objstr.c
@@ -116,7 +116,9 @@ #if MICROPY_ENABLE_SLICE } else if (MP_OBJ_IS_TYPE(rhs_in, &slice_type)) { machine_uint_t start, stop; - assert(m_seq_get_fast_slice_indexes(lhs_len, rhs_in, &start, &stop)); + if (!m_seq_get_fast_slice_indexes(lhs_len, rhs_in, &start, &stop)) { + assert(0); + } return mp_obj_new_str(lhs_data + start, stop - start, false); #endif } else {