fix: shell tab completion - ensure loop continues if file with non-.elf extension is encountered

This commit is contained in:
2026-06-16 14:37:58 +02:00
parent 29c131f65b
commit 21d6fbca95
2 changed files with 6 additions and 5 deletions
+5 -4
View File
@@ -57,10 +57,11 @@ int get_completions( // returns no. of results
This is somewhat of a workaround.
*/
if (montauk::starts_with(names[i] + 3, (const char*)string)) {
if (
r > arrayMax ||
!is_executable(names[i])
) break;
if (r > arrayMax)
break;
if (!is_executable(names[i]))
continue;
char* p = (char *)names[i] + 3;
strip_elf_extension(p);