1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-19 22:35:12 +03:00

Fixes #3882: Widget option min an max values were not parsed (resulted in Lua disabled)

This commit is contained in:
Damjan Adamic 2016-10-07 15:18:49 +02:00
parent c240042207
commit 88e1740422

View file

@ -799,7 +799,7 @@ ZoneOption * createOptionsArray(int reference)
luaL_checktype(L, -2, LUA_TNUMBER); // key is number
luaL_checktype(L, -1, LUA_TTABLE); // value is table
uint8_t field = 0;
for (lua_pushnil(L); lua_next(L, -2) && field<3; lua_pop(L, 1), field++) {
for (lua_pushnil(L); lua_next(L, -2) && field<5; lua_pop(L, 1), field++) {
switch (field) {
case 0:
luaL_checktype(L, -2, LUA_TNUMBER); // key is number