From 88b2aa70c89d7f9ca249b9bdd70f514e94805282 Mon Sep 17 00:00:00 2001 From: Andrew Karpow Date: Fri, 26 Jan 2018 15:06:34 +0100 Subject: [PATCH] fixed mpd connection with empty mpdpass introduced by #148 --- src/ympd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ympd.c b/src/ympd.c index 00b82ee..a699b28 100644 --- a/src/ympd.c +++ b/src/ympd.c @@ -113,7 +113,8 @@ int main(int argc, char **argv) run_as_user = strdup(optarg); break; case 'm': - mpd.password = strdup(optarg); + if (strlen(optarg) > 0) + mpd.password = strdup(optarg); break; case 'v': fprintf(stdout, "ympd %d.%d.%d\n" -- 2.20.1