Commit d4bd37a5 authored by Damien George's avatar Damien George
Browse files

py: Fix printing of error message when parsing malformed integer.

parent 78d7c45b
......@@ -149,7 +149,7 @@ value_error:
raise(exc, lex);
} else {
mp_obj_t exc = mp_obj_new_exception_msg_varg(&mp_type_ValueError,
"invalid syntax for integer with base %d: '%s'", base, str_val_start);
"invalid syntax for integer with base %d: '%.*s'", base, top - str_val_start, str_val_start);
raise(exc, lex);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment