Forked from anonymous/0001-command-allow-to-omit-END-in-ranges-START-END.patch
Created
February 18, 2013 22:13
-
-
Save Mic92/4981258 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 4437f3f80c3d168b626cd9ae1666aaef0ff378b5 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 | |
--- | |
src/protocol/ArgParser.cxx | 2 +- | |
1 file changed, 1 insertion(+), 1 deletion(-) | |
diff --git a/src/protocol/ArgParser.cxx b/src/protocol/ArgParser.cxx | |
index 0ab19f7..6bd53a3 100644 | |
--- a/src/protocol/ArgParser.cxx | |
+++ b/src/protocol/ArgParser.cxx | |
@@ -103,7 +103,7 @@ check_range(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; | |
-- | |
1.8.1.3 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment