commit | b648e98ad01d7f5c4aa102c4848507b5c31c859e | [log] [tgz] |
---|---|---|
author | Damien George <damien.p.george@gmail.com> | Wed Aug 26 15:45:06 2015 +0100 |
committer | Damien George <damien.p.george@gmail.com> | Sat Aug 29 23:13:51 2015 +0100 |
tree | ba681490d60f2adf0cf12e93bc599ed1a5671e1c | |
parent | 7ef75f9f750da6f1a7f149bc6cd8c28f1d9cad50 [diff] [blame] |
py/objstr: Fix error reporting for unexpected end of modulo format str.
diff --git a/py/objstr.c b/py/objstr.c index 98360d9..f91e173 100644 --- a/py/objstr.c +++ b/py/objstr.c
@@ -1299,7 +1299,7 @@ continue; } if (++str >= top) { - break; + goto incomplete_format; } if (*str == '%') { vstr_add_byte(&vstr, '%'); @@ -1369,6 +1369,7 @@ } if (str >= top) { +incomplete_format: if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) { terse_str_format_value_error(); } else {