Skip to content

Commit 1309ef0

Browse files
committed
translate: Can't use compress_max_length_bits during qstr generation
1 parent 2b32dce commit 1309ef0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

supervisor/shared/translate.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,13 @@ STATIC int put_utf8(char *buf, int u) {
8787
}
8888

8989
uint16_t decompress_length(const compressed_string_t *compressed) {
90+
#ifndef NO_QSTR
9091
#if (compress_max_length_bits <= 8)
9192
return 1 + (compressed->data >> (8 - compress_max_length_bits));
9293
#else
9394
return 1 + ((compressed->data * 256 + compressed->tail[0]) >> (16 - compress_max_length_bits));
9495
#endif
96+
#endif
9597
}
9698

9799
char *decompress(const compressed_string_t *compressed, char *decompressed) {

0 commit comments

Comments
 (0)