summaryrefslogtreecommitdiff
path: root/py/obj.c
diff options
context:
space:
mode:
authorScott Shawcroft <scott@tannewt.org>2020-05-29 10:16:24 -0700
committerScott Shawcroft <scott@tannewt.org>2020-05-29 10:16:24 -0700
commit2fd7a43f2f5b2bafad6bfed68b6c0a00688ece9b (patch)
tree8b2be430407cfed9b860875a30f4bab4da7c853c /py/obj.c
parent198f9579f3b3120caf8d292b303ff2a070c74053 (diff)
parent7ea95457eeb67fcaccfa911a4d979fa642262da5 (diff)
Merge remote-tracking branch 'adafruit/master' into wdt-nrf
Diffstat (limited to 'py/obj.c')
-rw-r--r--py/obj.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/py/obj.c b/py/obj.c
index f1e00de1a..4fa2032dc 100644
--- a/py/obj.c
+++ b/py/obj.c
@@ -94,17 +94,17 @@ void mp_obj_print_exception(const mp_print_t *print, mp_obj_t exc) {
assert(n % 3 == 0);
// Decompress the format strings
const compressed_string_t* traceback = translate("Traceback (most recent call last):\n");
- char decompressed[traceback->length];
+ char decompressed[decompress_length(traceback)];
decompress(traceback, decompressed);
#if MICROPY_ENABLE_SOURCE_LINE
const compressed_string_t* frame = translate(" File \"%q\", line %d");
#else
const compressed_string_t* frame = translate(" File \"%q\"");
#endif
- char decompressed_frame[frame->length];
+ char decompressed_frame[decompress_length(frame)];
decompress(frame, decompressed_frame);
const compressed_string_t* block_fmt = translate(", in %q\n");
- char decompressed_block[block_fmt->length];
+ char decompressed_block[decompress_length(block_fmt)];
decompress(block_fmt, decompressed_block);
// Print the traceback