1
0
Fork 0
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:
Kilrah 2019-07-14 10:07:04 +02:00
parent 4f180b157c
commit 99b460f9ba

View file

@ -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);
}
}