summaryrefslogtreecommitdiff
path: root/py/qstr.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/qstr.c')
-rw-r--r--py/qstr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/py/qstr.c b/py/qstr.c
index c244738a5..2553872b1 100644
--- a/py/qstr.c
+++ b/py/qstr.c
@@ -148,6 +148,7 @@ qstr qstr_from_str(const char *str) {
}
qstr qstr_from_strn(const char *str, mp_uint_t len) {
+ assert(len < (1 << (8 * MICROPY_QSTR_BYTES_IN_LEN)));
qstr q = qstr_find_strn(str, len);
if (q == 0) {
mp_uint_t hash = qstr_compute_hash((const byte*)str, len);