From 40e4f98ee896ea10967eb1c4323bb718331eabea Mon Sep 17 00:00:00 2001 From: Andrzej Rybczak Date: Wed, 25 Aug 2021 02:37:54 +0200 Subject: [PATCH] Support sockets without a socket inode --- src/mpdpp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mpdpp.cpp b/src/mpdpp.cpp index ccdee31d..9a92e5df 100644 --- a/src/mpdpp.cpp +++ b/src/mpdpp.cpp @@ -147,7 +147,7 @@ unsigned Connection::Version() const void Connection::SetHostname(const std::string &host) { size_t at = host.find("@"); - if (at != std::string::npos) + if (at != 0 && at != std::string::npos) { m_password = host.substr(0, at); m_host = host.substr(at+1);