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

This commit is contained in:
2026-06-16 14:29:59 +02:00
parent 3b87ab5ec5
commit 248afb844c
2 changed files with 6 additions and 5 deletions
+1 -1
View File
@@ -12,4 +12,4 @@
#pragma once #pragma once
#define MONTAUK_BUILD_NUMBER 64 #define MONTAUK_BUILD_NUMBER 76
+5 -4
View File
@@ -57,10 +57,11 @@ int get_completions( // returns no. of results
This is somewhat of a workaround. This is somewhat of a workaround.
*/ */
if (montauk::starts_with(names[i] + 3, (const char*)string)) { if (montauk::starts_with(names[i] + 3, (const char*)string)) {
if ( if (r > arrayMax)
r > arrayMax || break;
!is_executable(names[i])
) break; if (!is_executable(names[i]))
continue;
char* p = (char *)names[i] + 3; char* p = (char *)names[i] + 3;
strip_elf_extension(p); strip_elf_extension(p);