summaryrefslogtreecommitdiffstatshomepage
path: root/py/objfun.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/objfun.c')
-rw-r--r--py/objfun.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/objfun.c b/py/objfun.c
index 633f5d0cae..ab6326057f 100644
--- a/py/objfun.c
+++ b/py/objfun.c
@@ -427,7 +427,7 @@ STATIC machine_uint_t convert_obj_for_inline_asm(mp_obj_t obj) {
return (machine_uint_t)items;
} else {
mp_buffer_info_t bufinfo;
- if (mp_get_buffer(obj, &bufinfo)) {
+ if (mp_get_buffer(obj, &bufinfo, MP_BUFFER_WRITE)) {
// supports the buffer protocol, return a pointer to the data
return (machine_uint_t)bufinfo.buf;
} else {