py/objexcept: Fix hash of exc str created in mp_obj_new_exception_msg.
This commit is contained in:
parent
f8f2724297
commit
2d644ac455
@ -348,9 +348,9 @@ mp_obj_t mp_obj_new_exception_msg(const mp_obj_type_t *exc_type, const char *msg
|
||||
|
||||
// Create the string object and call mp_obj_exception_make_new to create the exception
|
||||
o_str->base.type = &mp_type_str;
|
||||
o_str->hash = qstr_compute_hash(o_str->data, o_str->len);
|
||||
o_str->len = strlen(msg);
|
||||
o_str->data = (const byte*)msg;
|
||||
o_str->hash = qstr_compute_hash(o_str->data, o_str->len);
|
||||
mp_obj_t arg = MP_OBJ_FROM_PTR(o_str);
|
||||
return mp_obj_exception_make_new(exc_type, 1, 0, &arg);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user