summaryrefslogtreecommitdiffstatshomepage
path: root/py/builtin.c
diff options
context:
space:
mode:
authorDamien <damien.p.george@gmail.com>2013-12-29 19:33:23 +0000
committerDamien <damien.p.george@gmail.com>2013-12-29 19:33:23 +0000
commit732407f1bf12364375162e8fb73816532a5d139c (patch)
treebf795d7bab01d6d603eec761affac7091be9606a /py/builtin.c
parenta1c8e5737cebba08909104d47c1dfd16ef80e6a1 (diff)
downloadmicropython-732407f1bf12364375162e8fb73816532a5d139c.tar.gz
micropython-732407f1bf12364375162e8fb73816532a5d139c.zip
Change memory allocation API to require size for free and realloc.
Diffstat (limited to 'py/builtin.c')
-rw-r--r--py/builtin.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/builtin.c b/py/builtin.c
index 7d2cc72b77..f6b57109c3 100644
--- a/py/builtin.c
+++ b/py/builtin.c
@@ -158,7 +158,7 @@ mp_obj_t mp_builtin_chr(mp_obj_t o_in) {
char *str = m_new(char, 2);
str[0] = ord;
str[1] = '\0';
- return mp_obj_new_str(qstr_from_str_take(str));
+ return mp_obj_new_str(qstr_from_str_take(str, 2));
} else {
nlr_jump(mp_obj_new_exception_msg(rt_q_ValueError, "chr() arg not in range(0x110000)"));
}