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

This commit is contained in:
Damien George 2015-03-16 10:42:50 +00:00
parent 78d7c45b69
commit d4bd37a561
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}
}