From 732407f1bf12364375162e8fb73816532a5d139c Mon Sep 17 00:00:00 2001 From: Damien Date: Sun, 29 Dec 2013 19:33:23 +0000 Subject: Change memory allocation API to require size for free and realloc. --- py/builtin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'py/builtin.c') diff --git a/py/builtin.c b/py/builtin.c index 7d2cc72b7..f6b57109c 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)")); } -- cgit v1.2.3