summaryrefslogtreecommitdiffstatshomepage
path: root/py/obj.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/obj.c')
-rw-r--r--py/obj.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/py/obj.c b/py/obj.c
index 3deee909a6..109676b879 100644
--- a/py/obj.c
+++ b/py/obj.c
@@ -52,6 +52,7 @@ void mp_obj_print_exception(mp_obj_t exc) {
machine_uint_t n, *values;
mp_obj_exception_get_traceback(exc, &n, &values);
if (n > 0) {
+ assert(n % 3 == 0);
printf("Traceback (most recent call last):\n");
for (int i = n - 3; i >= 0; i -= 3) {
#if MICROPY_ENABLE_SOURCE_LINE