mirror of
https://github.com/opentx/opentx.git
synced 2025-07-26 01:35:21 +03:00
Missing check in setGlobalVariable(...)
This commit is contained in:
parent
c53fbd9e94
commit
6ae7da4b1a
2 changed files with 2 additions and 2 deletions
|
@ -758,7 +758,7 @@ static int luaModelSetGlobalVariable(lua_State *L)
|
|||
int idx = luaL_checkunsigned(L, 1);
|
||||
int phase = luaL_checkunsigned(L, 2);
|
||||
int value = luaL_checkinteger(L, 3);
|
||||
if (phase < MAX_PHASES && idx < MAX_GVARS && value <= 500) {
|
||||
if (phase < MAX_PHASES && idx < MAX_GVARS && value >= -GVAR_LIMIT && value <= GVAR_LIMIT) {
|
||||
g_model.phaseData[phase].gvars[idx] = value;
|
||||
}
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue