From 9b2bc6b3492cf74e45898c0ab63d81fa37a2c990 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 28 Nov 2023 13:38:13 -0600 Subject: [PATCH] note an assmued invariant that may not be obvious --- supervisor/shared/translate/translate.c | 1 + 1 file changed, 1 insertion(+) diff --git a/supervisor/shared/translate/translate.c b/supervisor/shared/translate/translate.c index e23047c9a2..cbf90208f7 100644 --- a/supervisor/shared/translate/translate.c +++ b/supervisor/shared/translate/translate.c @@ -109,6 +109,7 @@ static int get_nbits(bitstream_state_t *st, int n) { return r; } +// note: the vstr must be a fixed-buffer vstr that matches the decompressed length of the string static void decompress_vstr(mp_rom_error_text_t compressed, vstr_t *decompressed) { bitstream_state_t b = { .ptr = &(compressed->data) + (compress_max_length_bits >> 3),