Merge pull request #14 from notandy/master

fixed mpd connection with empty mpdpass introduced by #148
This commit is contained in:
Daniel Schregenberger 2018-01-26 15:42:49 +01:00 committed by GitHub
commit 7a31b441b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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"