diff options
author | cbdev <cb@cbcdn.com> | 2019-07-13 17:56:23 +0200 |
---|---|---|
committer | cbdev <cb@cbcdn.com> | 2019-07-13 17:56:23 +0200 |
commit | c517b26ac559356650334a2d32d1b6249e66289d (patch) | |
tree | 243d74700bcb2c7b64413927089fcdb85ca4cc45 | |
parent | ee4a46105acecb6a7adc1e7189e8b0a66404b421 (diff) | |
download | midimonster-c517b26ac559356650334a2d32d1b6249e66289d.tar.gz midimonster-c517b26ac559356650334a2d32d1b6249e66289d.tar.bz2 midimonster-c517b26ac559356650334a2d32d1b6249e66289d.zip |
Fix indexing bug
-rw-r--r-- | backends/lua.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/backends/lua.c b/backends/lua.c index 08d8d3c..7f0c2de 100644 --- a/backends/lua.c +++ b/backends/lua.c @@ -341,7 +341,7 @@ static int lua_set(instance* inst, size_t num, channel** c, channel_value* v){ for(n = 0; n < num; n++){ data->input[c[n]->ident] = v[n].normalised; //call lua channel handlers if present - if(data->reference[n] != LUA_NOREF){ + if(data->reference[c[n]->ident] != LUA_NOREF){ lua_rawgeti(data->interpreter, LUA_REGISTRYINDEX, data->reference[c[n]->ident]); lua_pushnumber(data->interpreter, v[n].normalised); if(lua_pcall(data->interpreter, 1, 0, 0) != LUA_OK){ |