diff options
| author | Paul Sokolovsky | 2014-03-30 02:08:36 +0200 |
|---|---|---|
| committer | Paul Sokolovsky | 2014-03-30 04:16:24 +0300 |
| commit | 0ae518fb9e038c8e72f02364d9d7edfe2fef8a57 (patch) | |
| tree | 5de116717c0d98fa7857f554add7cfa1d577d716 /py | |
| parent | 89f94b51ab4a514f6327f8ef2519fb67cbf02603 (diff) | |
mp_obj_print_exception(): Assert that traceback has sane number of entries.
Diffstat (limited to 'py')
| -rw-r--r-- | py/obj.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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 |
