From: Toni Wilen Date: Mon, 26 Oct 2015 16:47:29 +0000 (+0200) Subject: Named Pipe unicode length calculation fix. X-Git-Tag: 3200~13 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=b0a47498127e368f0332431ee000c9c1a30c0e76;p=francis%2Fwinuae.git Named Pipe unicode length calculation fix. --- 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);