mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
cli_registry: move from bptree to dict, fix memory leak
This commit is contained in:
@@ -111,10 +111,10 @@ void cli_shell_completions_fill_variants(CliShellCompletions* completions) {
|
||||
if(segment.type == CliShellCompletionSegmentTypeCommand) {
|
||||
CliRegistry* registry = completions->registry;
|
||||
cli_registry_lock(registry);
|
||||
CliCommandTree_t* commands = cli_registry_get_commands(registry);
|
||||
CliCommandDict_t* commands = cli_registry_get_commands(registry);
|
||||
for
|
||||
M_EACH(registered_command, *commands, CliCommandTree_t) {
|
||||
FuriString* command_name = *registered_command->key_ptr;
|
||||
M_EACH(registered_command, *commands, CliCommandDict_t) {
|
||||
FuriString* command_name = registered_command->key;
|
||||
if(furi_string_start_with(command_name, input)) {
|
||||
CommandCompletions_push_back(completions->variants, command_name);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user