From d5b756413a1ea432e8e580b27fef004223895f07 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@higgsboson.tk>
Date: Mon, 18 Feb 2013 22:57:39 +0100
Subject: [PATCH] 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 52e9cab1c1743f64a7
---
 NEWS                     | 2 ++
 src/protocol/argparser.c | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/NEWS b/NEWS
index c92c0fa20..8617ffb08 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,6 @@
 ver 0.17.4 (2013/??/??)
+* protocol:
+  - allow to omit END in ranges (START:END)
 * decoder:
   - ffmpeg: support float planar audio (ffmpeg 1.1)
 * player:
diff --git a/src/protocol/argparser.c b/src/protocol/argparser.c
index b21d4c53c..d20437cb7 100644
--- a/src/protocol/argparser.c
+++ b/src/protocol/argparser.c
@@ -103,7 +103,7 @@ check_range(struct client *client, unsigned *value_r1, unsigned *value_r2,
 
 	if (*test == ':') {
 		value = strtol(++test, &test2, 10);
-		if (test2 == test || *test2 != '\0') {
+		if (*test2 != '\0') {
 			command_error(client, ACK_ERROR_ARG,
 				      "Integer or range expected: %s", s);
 			return false;