mirror of
https://github.com/opentx/opentx.git
synced 2025-07-23 00:05:17 +03:00
Fix executing tools without toolName defined
This commit is contained in:
parent
4f180b157c
commit
99b460f9ba
1 changed files with 2 additions and 1 deletions
|
@ -90,17 +90,18 @@ void addRadioScriptTool(uint8_t index, const char * path)
|
|||
{
|
||||
char toolName[TOOL_NAME_MAXLEN + 1];
|
||||
const char * label;
|
||||
char * ext = (char *)getFileExtension(path);
|
||||
if (readToolName(path, toolName)) {
|
||||
label = toolName;
|
||||
}
|
||||
else {
|
||||
char * ext = (char *)getFileExtension(path);
|
||||
*ext = '\0';
|
||||
label = getBasename(path);
|
||||
}
|
||||
|
||||
if (addRadioTool(index, label)) {
|
||||
f_chdir("/SCRIPTS/TOOLS/");
|
||||
*ext = '.';
|
||||
luaExec(path);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue