py/repl.c: Fix shadowing of local variable "i".
This commit is contained in:
parent
a1a2c411b2
commit
f27aa27a0c
@ -187,9 +187,9 @@ mp_uint_t mp_repl_autocomplete(const char *str, mp_uint_t len, const mp_print_t
|
|||||||
match_str = d_str;
|
match_str = d_str;
|
||||||
match_len = d_len;
|
match_len = d_len;
|
||||||
} else {
|
} else {
|
||||||
for (mp_uint_t i = s_len; i < match_len && i < d_len; ++i) {
|
for (mp_uint_t j = s_len; j < match_len && j < d_len; ++j) {
|
||||||
if (match_str[i] != d_str[i]) {
|
if (match_str[j] != d_str[j]) {
|
||||||
match_len = i;
|
match_len = j;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -227,7 +227,7 @@ mp_uint_t mp_repl_autocomplete(const char *str, mp_uint_t len, const mp_print_t
|
|||||||
}
|
}
|
||||||
if (line_len + gap + d_len <= MAX_LINE_LEN) {
|
if (line_len + gap + d_len <= MAX_LINE_LEN) {
|
||||||
// TODO optimise printing of gap?
|
// TODO optimise printing of gap?
|
||||||
for (int i = 0; i < gap; ++i) {
|
for (int j = 0; j < gap; ++j) {
|
||||||
mp_print_str(print, " ");
|
mp_print_str(print, " ");
|
||||||
}
|
}
|
||||||
mp_print_str(print, d_str);
|
mp_print_str(print, d_str);
|
||||||
|
Loading…
Reference in New Issue
Block a user