summaryrefslogtreecommitdiff
path: root/py/objstr.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-04-14 21:20:30 +0100
committerDamien George <damien.p.george@gmail.com>2014-04-14 21:20:30 +0100
commit3bb8bd899b2b1e5970b5ceb822bdf3df9b2e2d13 (patch)
tree0396642ad4a39c2de561330b02b4ae1d6e9fc5b5 /py/objstr.c
parent0ae9c7042ae0839cea575955f36af280943cb99f (diff)
Make USE_COMPUTED_GOTO a config option in mpconfig.h.
Disabled by default. Enabled in unix port.
Diffstat (limited to 'py/objstr.c')
-rw-r--r--py/objstr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/objstr.c b/py/objstr.c
index 08db2af66..fc1e1c569 100644
--- a/py/objstr.c
+++ b/py/objstr.c
@@ -662,7 +662,7 @@ mp_obj_t str_format(uint n_args, const mp_obj_t *args) {
if (arg_i > 0) {
nlr_raise(mp_obj_new_exception_msg(&mp_type_ValueError, "cannot switch from automatic field numbering to manual field specification"));
}
- int index;
+ int index = 0;
if (str_to_int(vstr_str(field_name), &index) != vstr_len(field_name) - 1) {
nlr_raise(mp_obj_new_exception_msg(&mp_type_KeyError, "attributes not supported yet"));
}