1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-20 06:45:10 +03:00

More custom scripts (7 instead of 3)

This commit is contained in:
Bertrand Songis 2014-02-19 16:41:18 +01:00
parent 5a7fda2f81
commit 7c4214d5b9
6 changed files with 8 additions and 8 deletions

View file

@ -935,10 +935,10 @@ void luaLoadModelScript(uint8_t index)
sid.state = SCRIPT_NOFILE;
if (ZEXIST(sd.file)) {
char filename[sizeof(SCRIPTS_PATH)+sizeof(sd.file)+sizeof(MIXES_EXT)] = SCRIPTS_PATH "/";
char filename[sizeof(SCRIPTS_PATH)+sizeof(sd.file)+sizeof(SCRIPTS_EXT)] = SCRIPTS_PATH "/";
strncpy(filename+sizeof(SCRIPTS_PATH), sd.file, sizeof(sd.file));
filename[sizeof(SCRIPTS_PATH)+sizeof(sd.file)] = '\0';
strcat(filename+sizeof(SCRIPTS_PATH), MIXES_EXT);
strcat(filename+sizeof(SCRIPTS_PATH), SCRIPTS_EXT);
luaLoad(filename, sid);
}
}