From 4bfb0c6b935f9986661eb75c9341f0f18521dfbf Mon Sep 17 00:00:00 2001 From: Tim Allen Date: Tue, 18 Jan 2022 14:44:09 +1100 Subject: [PATCH] When reporting an invalid session name, report the correct name. At this point, the session name has already been moved from the `session_name` parameter to the `m_session` member variable. --- src/remote.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/remote.cc b/src/remote.cc index e51fda89..e6992c20 100644 --- a/src/remote.cc +++ b/src/remote.cc @@ -849,7 +849,7 @@ Server::Server(String session_name, bool is_daemon) : m_session{std::move(session_name)}, m_is_daemon{is_daemon} { if (not all_of(m_session, is_identifier)) - throw runtime_error{format("invalid session name: '{}'", session_name)}; + throw runtime_error{format("invalid session name: '{}'", m_session)}; int listen_sock = socket(AF_UNIX, SOCK_STREAM, 0); fcntl(listen_sock, F_SETFD, FD_CLOEXEC);