Merge branch 'v0.20.x'

This commit is contained in:
Max Kellermann
2018-03-05 11:13:42 +01:00
6 changed files with 98 additions and 29 deletions

View File

@@ -164,6 +164,10 @@ SongTime
ParseCommandArgSongTime(const char *s)
{
auto value = ParseCommandArgFloat(s);
if (value < 0)
throw FormatProtocolError(ACK_ERROR_ARG,
"Negative value not allowed: %s", s);
return SongTime::FromS(value);
}