From b0a47498127e368f0332431ee000c9c1a30c0e76 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Mon, 26 Oct 2015 18:47:29 +0200 Subject: [PATCH] Named Pipe unicode length calculation fix. --- uaeipc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uaeipc.cpp b/uaeipc.cpp index fca20c7c..faeec5ce 100644 --- a/uaeipc.cpp +++ b/uaeipc.cpp @@ -344,7 +344,7 @@ int checkIPC (void *vipc, struct uae_prefs *p) if (_tcslen (out) >= IPC_BUFFER_SIZE) out[IPC_BUFFER_SIZE - 1] = 0; _tcscpy ((TCHAR*)ipc->outbuf, out); - outlen = _tcsclen ((TCHAR*)ipc->outbuf) + sizeof (TCHAR); + outlen = (_tcsclen ((TCHAR*)ipc->outbuf) + 1) * sizeof (TCHAR); } else { ua_copy ((uae_char*)ipc->outbuf, sizeof ipc->outbuf, out); outlen = strlen ((char*)ipc->outbuf) + sizeof (char); -- 2.47.3