From 7fe88765fd43cafc7507fdccf7275f4fc44d9258 Mon Sep 17 00:00:00 2001 From: msciotti Date: Fri, 16 Nov 2018 16:18:11 -0800 Subject: [PATCH] maybe this fixes it --- src/connection_win.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/connection_win.cpp b/src/connection_win.cpp index 9033057..7706f30 100644 --- a/src/connection_win.cpp +++ b/src/connection_win.cpp @@ -33,11 +33,9 @@ static BaseConnectionWin Connection; bool BaseConnection::Open(int pipe) { - std::wostringstream stream{}; - stream << L"\\\\?\\pipe\\discord-ipc-" << pipe; - std::wstring asString = stream.str(); - const WCHAR* pipeName = asString.c_str(); + wchar_t pipeName[]{L"\\\\?\\pipe\\discord-ipc-0"}; const size_t pipeDigit = sizeof(pipeName) / sizeof(wchar_t) - 2; + pipeName[pipeDigit] = (L'%d', pipe); auto self = reinterpret_cast(this); for (;;) { self->pipe = ::CreateFileW(