Fixes #3329: playDuration() second parameter is now really optional
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user