From 8150cd63c1826e9411b75a1aaf69ec1826fbcc9c Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Fri, 12 Sep 2014 19:17:52 +0200 Subject: [PATCH] CLuaInstance::setBlank: Fix parameter Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/7398b4327678d6e0ea0159fa51d85770436e7513 Author: Michael Liebmann Date: 2014-09-12 (Fri, 12 Sep 2014) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/luainstance.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gui/luainstance.cpp b/src/gui/luainstance.cpp index 38d07250b..8ec6754ea 100644 --- a/src/gui/luainstance.cpp +++ b/src/gui/luainstance.cpp @@ -645,9 +645,11 @@ extern cVideo * videoDecoder; int CLuaInstance::setBlank(lua_State *L) { - int enable = 1; - enable = luaL_checkint(L, 2); - videoDecoder->setBlank((enable==1)?true:false); + bool enable = true; + int numargs = lua_gettop(L); + if (numargs > 1) + enable = _luaL_checkbool(L, 2); + videoDecoder->setBlank(enable); return 0; }