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

Wrong constant used for Lua inputs count

This commit is contained in:
bsongis 2014-06-04 22:22:22 +02:00
parent 0a5c3f42c5
commit 85cb8b3dbd

View file

@ -921,7 +921,7 @@ int luaGetInputs(ScriptInternalData & sid)
return -1;
sid.inputsCount = 0;
for (lua_pushnil(L); lua_next(L, -2) && sid.inputsCount<MAX_SCRIPT_OUTPUTS; lua_pop(L, 1)) {
for (lua_pushnil(L); lua_next(L, -2) && sid.inputsCount<MAX_SCRIPT_INPUTS; lua_pop(L, 1)) {
luaL_checktype(L, -2, LUA_TNUMBER); // key is number
luaL_checktype(L, -1, LUA_TTABLE); // value is table
uint8_t field = 0;