1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-15 04:15:26 +03:00

Fixes #3329: playDuration() second parameter is now really optional

This commit is contained in:
Damjan Adamic 2016-02-29 19:09:41 +01:00
parent fb3dd1303c
commit 19f392131c

View file

@ -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;
}