summaryrefslogtreecommitdiffstatshomepage
path: root/py/qstr.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/qstr.c')
-rw-r--r--py/qstr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/qstr.c b/py/qstr.c
index 2553872b16..813f251502 100644
--- a/py/qstr.c
+++ b/py/qstr.c
@@ -49,7 +49,7 @@
// - data follows
// - \0 terminated (for now, so they can be printed using printf)
-#define Q_GET_HASH(q) ((q)[0] | ((q)[1] << 8))
+#define Q_GET_HASH(q) ((mp_uint_t)(q)[0] | ((mp_uint_t)(q)[1] << 8))
#define Q_GET_ALLOC(q) (2 + MICROPY_QSTR_BYTES_IN_LEN + Q_GET_LENGTH(q) + 1)
#define Q_GET_DATA(q) ((q) + 2 + MICROPY_QSTR_BYTES_IN_LEN)
#if MICROPY_QSTR_BYTES_IN_LEN == 1