diff options
author | Damien George <damien.p.george@gmail.com> | 2018-05-09 16:15:02 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2018-05-09 16:15:02 +1000 |
commit | eb88803ac859db07726481501aea5c0e6bbf3705 (patch) | |
tree | 43829ab1b462b4949ee82407aaed5bc44b67e75b /py/repl.c | |
parent | c1115d931fdf3780df92233c3b7bbf2e5cbe82ca (diff) |
py/{modbuiltins,repl}: Start qstr probing from after empty qstr.
The list of qstrs starts with MP_QSTR_NULL followed by MP_QSTR_, and these
should never appear in dir() or REPL tab completion, so skip them.
Diffstat (limited to 'py/repl.c')
-rw-r--r-- | py/repl.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -176,7 +176,7 @@ size_t mp_repl_autocomplete(const char *str, size_t len, const mp_print_t *print const char *match_str = NULL; size_t match_len = 0; qstr q_first = 0, q_last; - for (qstr q = 1; q < nqstr; ++q) { + for (qstr q = MP_QSTR_ + 1; q < nqstr; ++q) { size_t d_len; const char *d_str = (const char*)qstr_data(q, &d_len); if (s_len <= d_len && strncmp(s_start, d_str, s_len) == 0) { |