diff options
Diffstat (limited to 'py/parsenum.c')
-rw-r--r-- | py/parsenum.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/py/parsenum.c b/py/parsenum.c index 1a39c899d5..57261de40d 100644 --- a/py/parsenum.c +++ b/py/parsenum.c @@ -39,7 +39,7 @@ STATIC NORETURN void raise_exc(mp_obj_t exc, mp_lexer_t *lex) { // if lex!=NULL then the parser called us and we need to convert the // exception's type from ValueError to SyntaxError and add traceback info if (lex != NULL) { - ((mp_obj_base_t*)exc)->type = &mp_type_SyntaxError; + ((mp_obj_base_t*)MP_OBJ_TO_PTR(exc))->type = &mp_type_SyntaxError; mp_obj_exception_add_traceback(exc, lex->source_name, lex->tok_line, MP_QSTR_NULL); } nlr_raise(exc); |