diff options
author | Damien George <damien.p.george@gmail.com> | 2015-03-16 10:42:50 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2015-03-16 10:42:50 +0000 |
commit | d4bd37a561a18aa849c73ac285204eebd1078c15 (patch) | |
tree | 3eb6ae356c75b92779478327de011737e76bafbe /py/parsenum.c | |
parent | 78d7c45b69063cf8009b903b177874317b071027 (diff) | |
download | micropython-d4bd37a561a18aa849c73ac285204eebd1078c15.tar.gz micropython-d4bd37a561a18aa849c73ac285204eebd1078c15.zip |
py: Fix printing of error message when parsing malformed integer.
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 ffd065df4b..c11a846aaf 100644 --- a/py/parsenum.c +++ b/py/parsenum.c @@ -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); } } |