diff options
| author | Scott Shawcroft <scott@tannewt.org> | 2018-08-16 15:08:42 -0700 |
|---|---|---|
| committer | Scott Shawcroft <scott@tannewt.org> | 2018-08-16 17:41:53 -0700 |
| commit | c3c5951d4486a1f1cf2c7841545d0d5f28409c5b (patch) | |
| tree | 5ca0f680787f77e2b363709966d8620274c05475 /py | |
| parent | 96534e598ea6ca7f67b31c547b50c27331396158 (diff) | |
Fix test that broke due to decompressing to too small of a scope.
Diffstat (limited to 'py')
| -rw-r--r-- | py/objexcept.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/py/objexcept.c b/py/objexcept.c index f211f19a3..8bd6245a4 100644 --- a/py/objexcept.c +++ b/py/objexcept.c @@ -116,8 +116,8 @@ void mp_obj_exception_print(const mp_print_t *print, mp_obj_t o_in, mp_print_kin if (o->base.type == &mp_type_OSError && MP_OBJ_IS_SMALL_INT(o->args->items[0])) { const compressed_string_t* common = mp_common_errno_to_str(o->args->items[0]); const char* msg; - if (common != NULL) { - char decompressed[common->length]; + char decompressed[50]; + if (common != NULL && common->length <= 50) { decompress(common, decompressed); msg = decompressed; } else { |
