From 19f392131cfe1305fa09a9b0cf485442876b43a4 Mon Sep 17 00:00:00 2001 From: Damjan Adamic Date: Mon, 29 Feb 2016 19:09:41 +0100 Subject: [PATCH] Fixes #3329: playDuration() second parameter is now really optional --- radio/src/lua/api_general.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/radio/src/lua/api_general.cpp b/radio/src/lua/api_general.cpp index 7037c81df..534fce7f6 100644 --- a/radio/src/lua/api_general.cpp +++ b/radio/src/lua/api_general.cpp @@ -580,7 +580,7 @@ Play a time value (text to speech) static int luaPlayDuration(lua_State *L) { int duration = luaL_checkinteger(L, 1); - bool playTime = (luaL_checkinteger(L, 2) != 0); + bool playTime = (luaL_optinteger(L, 2, 0) != 0); playDuration(duration, playTime ? PLAY_TIME : 0, 0); return 0; }