forked from Bananymous/banan-os
Shell: Don't crash when there are no tab completions available :D
This commit is contained in:
parent
9775e83374
commit
f67cad326a
|
@ -1509,12 +1509,12 @@ int main(int argc, char** argv)
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
for (size_t i = 0; i < completions.size() - 1; i++)
|
for (size_t i = 1; i < completions.size();)
|
||||||
{
|
{
|
||||||
if (completions[i] != completions[i + 1])
|
if (completions[i - 1] == completions[i])
|
||||||
continue;
|
completions.remove(i);
|
||||||
completions.remove(i + 1);
|
else
|
||||||
i--;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (completions.empty())
|
if (completions.empty())
|
||||||
|
|
Loading…
Reference in New Issue