Fixes #3285: only first 32 input lines (out of 64) were accessible in Lua

This commit is contained in:
Damjan Adamic
2016-02-15 21:50:57 +01:00
parent 79a5f65a2c
commit 29b8b2685c
+2 -2
View File
@@ -278,7 +278,7 @@ static int luaModelResetTimer(lua_State *L)
static unsigned int getFirstInput(unsigned int chn)
{
for (unsigned int i=0; i<MAX_INPUTS; i++) {
for (unsigned int i=0; i<MAX_EXPOS; i++) {
ExpoData * expo = expoAddress(i);
if (!expo->srcRaw || expo->chn >= chn) {
return i;
@@ -290,7 +290,7 @@ static unsigned int getFirstInput(unsigned int chn)
static unsigned int getInputsCountFromFirst(unsigned int chn, unsigned int first)
{
unsigned int count = 0;
for (unsigned int i=first; i<MAX_INPUTS; i++) {
for (unsigned int i=first; i<MAX_EXPOS; i++) {
ExpoData * expo = expoAddress(i);
if (!expo->srcRaw || expo->chn!=chn) break;
count++;