command: allow to omit END in ranges (START:END)

If END is omitted, mpd should use the highest possible value instead of raising an error.
This partially reverts 52e9cab1c1
This commit is contained in:
Jörg Thalheim 2013-02-18 22:57:39 +01:00 committed by Max Kellermann
parent 96dc0a318a
commit d5b756413a
2 changed files with 3 additions and 1 deletions

2
NEWS
View File

@ -1,4 +1,6 @@
ver 0.17.4 (2013/??/??) ver 0.17.4 (2013/??/??)
* protocol:
- allow to omit END in ranges (START:END)
* decoder: * decoder:
- ffmpeg: support float planar audio (ffmpeg 1.1) - ffmpeg: support float planar audio (ffmpeg 1.1)
* player: * player:

View File

@ -103,7 +103,7 @@ check_range(struct client *client, unsigned *value_r1, unsigned *value_r2,
if (*test == ':') { if (*test == ':') {
value = strtol(++test, &test2, 10); value = strtol(++test, &test2, 10);
if (test2 == test || *test2 != '\0') { if (*test2 != '\0') {
command_error(client, ACK_ERROR_ARG, command_error(client, ACK_ERROR_ARG,
"Integer or range expected: %s", s); "Integer or range expected: %s", s);
return false; return false;