Commit ff4678c5 authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

objexcept: Fix thinko with args to mp_obj_new_list().

First arg is not alloc size, but real size, so if used as
mp_obj_new_list(3, NULL), need to store items, not append.
parent 36109d24
......@@ -162,7 +162,7 @@ void mp_obj_exception_add_traceback(mp_obj_t self_in, qstr file, machine_uint_t
// for traceback, we are just using the list object for convenience, it's not really a list of Python objects
if (self->traceback == MP_OBJ_NULL) {
self->traceback = mp_obj_new_list(3, NULL);
self->traceback = mp_obj_new_list(0, NULL);
mp_obj_list_append(self->traceback, (mp_obj_t)(machine_uint_t)file);
mp_obj_list_append(self->traceback, (mp_obj_t)(machine_uint_t)line);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment