diff options
Diffstat (limited to 'src/protocol')
-rw-r--r-- | src/protocol/ArgParser.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/protocol/ArgParser.cxx b/src/protocol/ArgParser.cxx index 47fdfa405..bdc28bcbf 100644 --- a/src/protocol/ArgParser.cxx +++ b/src/protocol/ArgParser.cxx @@ -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); } |