Skip to content

Commit bbd9251

Browse files
committed
py: bytes(): Make sure we add values as bytes, not as chars.
1 parent 98e3a64 commit bbd9251

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

py/objstr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ STATIC mp_obj_t bytes_make_new(mp_obj_t type_in, mp_uint_t n_args, mp_uint_t n_k
223223
mp_obj_t iterable = mp_getiter(args[0]);
224224
mp_obj_t item;
225225
while ((item = mp_iternext(iterable)) != MP_OBJ_STOP_ITERATION) {
226-
vstr_add_char(&vstr, MP_OBJ_SMALL_INT_VALUE(item));
226+
vstr_add_byte(&vstr, MP_OBJ_SMALL_INT_VALUE(item));
227227
}
228228

229229
return mp_obj_new_str_from_vstr(&mp_type_bytes, &vstr);

0 commit comments

Comments
 (0)