From 4cdd35940563665c67d574b84760d1a1518d7ae4 Mon Sep 17 00:00:00 2001 From: bsongis Date: Wed, 4 Jun 2014 22:40:58 +0200 Subject: [PATCH] Prevents a crash in Lua when the inputs/outputs count exceeds the maximum allowed --- radio/src/lua.cpp | 83 ++++++++++++++++++++++++----------------------- 1 file changed, 43 insertions(+), 40 deletions(-) diff --git a/radio/src/lua.cpp b/radio/src/lua.cpp index a9254438a..0238225a4 100644 --- a/radio/src/lua.cpp +++ b/radio/src/lua.cpp @@ -921,48 +921,49 @@ int luaGetInputs(ScriptInternalData & sid) return -1; sid.inputsCount = 0; - for (lua_pushnil(L); lua_next(L, -2) && sid.inputsCount