Skip to content

Commit f27aa27

Browse files
committed
py/repl.c: Fix shadowing of local variable "i".
1 parent a1a2c41 commit f27aa27

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

py/repl.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,9 @@ mp_uint_t mp_repl_autocomplete(const char *str, mp_uint_t len, const mp_print_t
187187
match_str = d_str;
188188
match_len = d_len;
189189
} else {
190-
for (mp_uint_t i = s_len; i < match_len && i < d_len; ++i) {
191-
if (match_str[i] != d_str[i]) {
192-
match_len = i;
190+
for (mp_uint_t j = s_len; j < match_len && j < d_len; ++j) {
191+
if (match_str[j] != d_str[j]) {
192+
match_len = j;
193193
break;
194194
}
195195
}
@@ -227,7 +227,7 @@ mp_uint_t mp_repl_autocomplete(const char *str, mp_uint_t len, const mp_print_t
227227
}
228228
if (line_len + gap + d_len <= MAX_LINE_LEN) {
229229
// TODO optimise printing of gap?
230-
for (int i = 0; i < gap; ++i) {
230+
for (int j = 0; j < gap; ++j) {
231231
mp_print_str(print, " ");
232232
}
233233
mp_print_str(print, d_str);

0 commit comments

Comments
 (0)