1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-26 01:35:21 +03:00

Order of outputs was wrong

This commit is contained in:
Damjan Adamic 2014-04-26 18:48:30 +02:00
parent fc4cf73c89
commit bd31c541f6

View file

@ -1071,7 +1071,7 @@ void luaTask(uint8_t evt)
lua_pushinteger(L, sd.inputs[j]);
}
if (lua_pcall(L, sid.inputsCount, sid.outputsCount, 0) == 0) {
for (int j=0; j<sid.outputsCount; j++) {
for (int j=sid.outputsCount-1; j>=0; j--) {
if (!lua_isnumber(L, -1)) {
sid.state = (instructionsPercent > 100 ? SCRIPT_KILLED : SCRIPT_SYNTAX_ERROR);
TRACE("Script %10s disabled", sd.file);